Change way to move file at the end of a download
Description
Change the way to move downloaded temporary file to final location at the end of a download. The previous way to do it, was using File.renameTo() which required old version of a file to be deleted because renameTo() cannot override. This deletion was catched by FileEventListener, which triggers Remote File deletion in this case, so it might result in cloud file deletion, etc.
Technical details
The temporary file is downloaded into cacheDir (so RAM and not disc)
Tests
-
https://gitlab.e.foundation/e/os/eDrive/-/quality/test_cases/147 -
https://gitlab.e.foundation/e/os/eDrive/-/quality/test_cases/146 -
https://gitlab.e.foundation/e/os/eDrive/-/quality/test_cases/150
Issues
https://gitlab.e.foundation/e/os/backlog/-/issues/831
10 commandments of code reviews
Edited by Vincent Bourgmayer