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

Switch to internal files directory for storing books #129

Merged
merged 5 commits into from
Mar 21, 2024

Conversation

starry-shivam
Copy link
Member

@starry-shivam starry-shivam commented Mar 21, 2024

Switch to internal files directory for storing books instead of using external download directory

This fixes the issue of books failing to open randomly over time due to the app losing access to EPUB files it created. This loss of access can occur for various reasons, such as uninstalling and reinstalling the app, MediaStore reindexing, or another app gaining access to the download directory, resulting in write/read access loss. These issues are difficult to reproduce. Two possible fixes I can think of are requesting access to all files, as file managers do, or switching to the app-specific internal files directory. The former option, of course, makes no sense, so we're going with the latter. If you need access to the EPUB file of a certain book, you can always swipe right to save or share it anywhere you like.

While on that also fixed issue with books not getting saved in library when using multi user mode / work profiles due to hard coded primary user (../0) in filepath.

@starry-shivam starry-shivam changed the title Fix downloaded book failing to open after a certain time Switch to internal files directory for storing books Mar 21, 2024
@starry-shivam starry-shivam merged commit 1f35d7d into main Mar 21, 2024
1 check passed
@starry-shivam starry-shivam deleted the permission-cleanup branch March 21, 2024 11:49
starry-shivam added a commit that referenced this pull request Mar 22, 2024
Removed declaration of storage permission as it is no longer needed from v3.2.0, See #129 for more information.

Some other grammatical fixes for better clarity and readability.
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.

1 participant