-
Notifications
You must be signed in to change notification settings - Fork 857
Complement for #3656 #3699
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
Complement for #3656 #3699
Conversation
Previously, when a download was aborted (e.g. due to a bad internet connection), a partly downloaded file was remaining in cache, which would then be delivered upon later requests. This can lead e.g. to chats where images aren't loading. To avoid this, first download files to a temporary file that is not the final cache file, and only rename/move it on finish. Note that if you already have broken downloads, you still need to clear cache once to get rid of them after this commit, but it should not occur anymore afterwards.
Avoid incomplete downloads in cache
Will not always delete part files in case of crashes
| } | ||
| } | ||
|
|
||
| var atomicFileCreator1: AtomicFileCreator? = null |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can it be renamed to something like encyptedCachedAtomicFile
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Renamed to atomicFileDownload, it can be a clear file
| } | ||
|
|
||
| var atomicFileCreator1: AtomicFileCreator? = null | ||
| var atomicFileCreator2: AtomicFileCreator? = null |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same renamed to clearCachedAtomicFime
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Renamed to atomicFileDecrypt
See #3656
CC @SpiritCroc