diff --git a/app/src/main/java/foundation/e/drive/operations/DownloadFileOperation.java b/app/src/main/java/foundation/e/drive/operations/DownloadFileOperation.java index 370e9edebc06a04ed8aa0d05d7324efa0f7d1454..fcce43f8163a893e7db3151b92e9a3d7e6226467 100644 --- a/app/src/main/java/foundation/e/drive/operations/DownloadFileOperation.java +++ b/app/src/main/java/foundation/e/drive/operations/DownloadFileOperation.java @@ -61,7 +61,6 @@ public class DownloadFileOperation extends RemoteOperation { * @param syncedFileState SyncedFileState corresponding to remote file */ public DownloadFileOperation(@NonNull RemoteFile remoteFile, @NonNull SyncedFileState syncedFileState, @NonNull Context context) { - Timber.tag(DownloadFileOperation.class.getSimpleName()); this.remoteFile = remoteFile; this.syncedFileState = syncedFileState; this.previousEtag = syncedFileState.getLastEtag(); @@ -178,7 +177,10 @@ public class DownloadFileOperation extends RemoteOperation { try { if (!targetDir.exists()) targetDir.mkdirs(); - final Path copyResult = Files.copy(tmpFile.toPath(), targetFile.toPath(), REPLACE_EXISTING); + final Path targetPath = targetFile.toPath(); + final Path tmpPath = tmpFile.toPath(); + + final Path copyResult = Files.copy(tmpPath, targetPath, REPLACE_EXISTING); if (copyResult.toFile().length() == tmpFile.length()) { tmpFile.delete(); return true; diff --git a/app/src/main/java/foundation/e/drive/work/CreateRemoteFolderWorker.java b/app/src/main/java/foundation/e/drive/work/CreateRemoteFolderWorker.java index 24987dce4ae12c8122e30679bfc5d3b699f2893a..d24339508794fdac4d5bf47fe3a672d49cbd2db4 100644 --- a/app/src/main/java/foundation/e/drive/work/CreateRemoteFolderWorker.java +++ b/app/src/main/java/foundation/e/drive/work/CreateRemoteFolderWorker.java @@ -106,15 +106,15 @@ public class CreateRemoteFolderWorker extends Worker { final Data data = getInputData(); final String category = data.getString(DATA_KEY_LIBELLE); final String remotePath = data.getString(DATA_KEY_REMOTE_PATH); - final String localPath = data.getString(DATA_KEY_REMOTE_PATH); + final String localPath = data.getString(DATA_KEY_LOCAL_PATH); if( category == null || remotePath == null || localPath == null) { return null; } final SyncedFolder result = new SyncedFolder( category, - remotePath, localPath, + remotePath, data.getBoolean(DATA_KEY_SCAN_LOCAL, true), data.getBoolean(DATA_KEY_SCAN_REMOTE, true), data.getBoolean(DATA_KEY_ENABLE, true),