-
-
Notifications
You must be signed in to change notification settings - Fork 734
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
bug: tmp directory should not be inside the cache directory #2120
Labels
Bug report
Something isn't working
Comments
That would be helpful. I'll assign the issue to you |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bug description
When the storage space is not enough, the Android system deletes apps cache automatically even if the app is running.
Currently, ReVanced Manager (for both Compose and Flutter) places the tmp directory inside the cache folder.
Therefore, if the cache deletion occurs during the patching process, the patching will fail.
The following files are better to be moved out of the cache folder to ensure they are kept until the end of patching:
This automatic deletion is only occurs for the cache directory.
The cacheDir is unreliable for working directory due to deletion by Android system.
So, changing the tempDir place from
app.cacheDir.resolve("ephemeral")
to likeapp.getDir("ephemeral", Context.MODE_PRIVATE)
solves this issue.This puts the responsibility on the ReVanced Manager to ensure that the ephemeral folder is deleted (as users cannot manage the data directory), but this is not a problem since it is already deleted every time the app is launched and the patching is finished.
cf. https://discord.com/channels/952946952348270622/1135563848586379264/1269377385669857282 (Discussion of this issue)
I can make a PR for this.
Version of ReVanced Manager and version & name of app you are patching
Flutter Manager v1.21.1
Compose Manager 32f2710 (compose-dev)
Patch logs
Examples of cache deletion issues:
Acknowledgements
The text was updated successfully, but these errors were encountered: