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: Medical wikimedia (mini) keeps crashing. #4007

Merged
merged 3 commits into from
Oct 18, 2024
Merged

Fixed: Medical wikimedia (mini) keeps crashing. #4007

merged 3 commits into from
Oct 18, 2024

Conversation

MohitMaliFtechiz
Copy link
Collaborator

@MohitMaliFtechiz MohitMaliFtechiz commented Sep 23, 2024

Fixes #4000

  • This issue occurred when we tried to access ZIM files from the application’s folder in the zimFiles() method. In this method, we add directories to a non-null list of files. However, when attempting to retrieve the list of files from the application directory, the SD card path was null due to the SD card being unmounted, which caused the application to crash.
  • To fix this, we have improved our zimFiles() and obbFiles() methods to return only existing, non-null directories. This ensures proper handling of file system detection, so if a directory is unavailable or returns null, these methods handle it appropriately.

@MohitMaliFtechiz MohitMaliFtechiz marked this pull request as draft September 23, 2024 13:56
@kelson42
Copy link
Collaborator

kelson42 commented Oct 6, 2024

@MohitMaliFtechiz Please complete PR

Copy link

codecov bot commented Oct 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 58.24%. Comparing base (f307700) to head (c3d9bb7).
Report is 4 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #4007      +/-   ##
============================================
+ Coverage     58.23%   58.24%   +0.01%     
- Complexity     1506     1507       +1     
============================================
  Files           315      315              
  Lines         13020    13020              
  Branches       1657     1657              
============================================
+ Hits           7582     7584       +2     
  Misses         4325     4325              
+ Partials       1113     1111       -2     

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

@MohitMaliFtechiz
Copy link
Collaborator Author

@kelson42 The PR is complete with test cases.

* This issue occurred when we tried to access ZIM files from the application’s folder in the `zimFiles()` method. In this method, we add directories to a non-null list of files. However, when attempting to retrieve the list of files from the application directory, the SD card path was null due to the SD card being unmounted, which caused the application to crash.
* To fix this, we have improved our `zimFiles()` and `obbFiles()` methods to return only existing, non-null directories. This ensures proper handling of file system detection, so if a directory is unavailable or returns null, these methods handle it appropriately.
@kelson42 kelson42 merged commit ad6d2c6 into main Oct 18, 2024
22 checks passed
@kelson42 kelson42 deleted the Fixes#4000 branch October 18, 2024 13:53
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.

Medical wikimedia (mini) keeps crashing
3 participants