Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed version 3.8.1 from Google Play cannot find zim on SD card that are copied to app-specific directory. #3582

Merged
merged 1 commit into from
Dec 14, 2023

Conversation

MohitMaliFtechiz
Copy link
Collaborator

Fixes #3579

We have limitations in scanning all directories on Android 11 and above in the Play Store variant. If a user copies the ZIM file to the app-specific directory on the SD card, the scanning of the app-specific directory on the SD card has not been added, resulting in the copied files not being displayed on the library screen. Therefore, we added the scanning of app-specific directory to fix the issue.

Copy link

codecov bot commented Dec 8, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (323598f) 48.93% compared to head (243f058) 48.94%.
Report is 11 commits behind head on develop.

❗ Current head 243f058 differs from pull request most recent head fc6740e. Consider uploading reports for the commit fc6740e to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             develop    #3582   +/-   ##
==========================================
  Coverage      48.93%   48.94%           
  Complexity      1087     1087           
==========================================
  Files            285      285           
  Lines          10495    10496    +1     
  Branches        1404     1404           
==========================================
+ Hits            5136     5137    +1     
  Misses          4527     4527           
  Partials         832      832           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@kelson42
Copy link
Collaborator

@gouri-panda Looks good to you?

@gouri-panda
Copy link
Collaborator

@kelson42 I'm looking at the search issues that we're having. After that, I'll complete this 👍

@@ -36,6 +36,14 @@ object StorageDeviceUtils {
add(environmentDevices(context))
addAll(externalMountPointDevices())
addAll(externalFilesDirsDevices(context, false))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

addAll(externalFilesDirsDevices(context, false))

@MohitMaliFtechiz Then we shouldn't need this anymore? right?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gouri-panda We need this because it scans for the device's main directory when we pass false into it.

private fun generalisePath(path: String, writable: Boolean) =
    if (writable) path
    else path.substringBefore("/Android/data/")

…t are copied to app-specific directory.

* Scan the app-specific directory as well because we have limitations in scanning all directories on Android 11 and above in the Play Store variant. If a user copies the ZIM file to the app-specific directory on the SD card, the scanning of the app-specific directory on the SD card has not been added, resulting in the copied files not being displayed on the library screen. Therefore, we need to explicitly include the app-specific directory for scanning.
@kelson42
Copy link
Collaborator

no time to wait more for a review

@kelson42 kelson42 merged commit eece22e into develop Dec 14, 2023
7 of 8 checks passed
@kelson42 kelson42 deleted the Issue#3579 branch December 14, 2023 06:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

version 3.8.1 from Google Play cannot find zim on SD card
3 participants