fix file move issue due to error in syncedFolder localPath
Description
eDrive get an "NoSuchFileException" when trying to move downloaded file from cache to final location.
Technical details
10-02 17:49:10.556 3424 6161 E DownloadFileOperation: java.nio.file.NoSuchFileException: /Photos/OpenCamera/IMG_20220907_152730.jpg
10-02 17:49:10.556 3424 6161 E DownloadFileOperation: at sun.nio.fs.UnixCopyFile.copyFile(UnixCopyFile.java:243)
10-02 17:49:10.556 3424 6161 E DownloadFileOperation: at sun.nio.fs.UnixCopyFile.copy(UnixCopyFile.java:581)
10-02 17:49:10.556 3424 6161 E DownloadFileOperation: at sun.nio.fs.UnixFileSystemProvider.copy(UnixFileSystemProvider.java:253)
10-02 17:49:10.556 3424 6161 E DownloadFileOperation: at java.nio.file.Files.copy(Files.java:1274)
10-02 17:49:10.556 3424 6161 E DownloadFileOperation: at foundation.e.drive.operations.DownloadFileOperation.moveFileToRealLocation(DownloadFileOperation.java:181)
10-02 17:49:10.556 3424 6161 E DownloadFileOperation: at foundation.e.drive.operations.DownloadFileOperation.onDownloadSuccess(DownloadFileOperation.java:154)
10-02 17:49:10.556 3424 6161 E DownloadFileOperation: at foundation.e.drive.operations.DownloadFileOperation.run(DownloadFileOperation.java:98)
10-02 17:49:10.556 3424 6161 E DownloadFileOperation: at com.owncloud.android.lib.common.operations.RemoteOperation.run(RemoteOperation.java:399)
10-02 17:49:10.556 3424 6161 E DownloadFileOperation: at java.lang.Thread.run(Thread.java:1012)
10-02 17:49:10.556 3424 6161 D DownloadFileOperation: Failed to move /storage/emulated/0/Android/data/foundation.e.drive/cache/Photos/OpenCamera/IMG_20220907_152730.jpg to /Photos/OpenCamera/IMG_20220907_152730.jpg
10-02 17:49:10.557 3424 6161 D DbHelper: manageSyncedFileStateDB( IMG_20220907_152730.jpg, UPDATE )
10-02 17:49:10.563 3424 6039 V SynchronizationService: onRemoteOperationFinish()
In the end the problem was copy/paste error introduce two monthes ago in this commit
Tests
Issues
https://gitlab.e.foundation/e/backlog/-/issues/7341
10 commandments of code reviews
Edited by Vincent Bourgmayer