mirror of
https://github.com/nextcloud/android.git
synced 2024-11-23 21:55:48 +03:00
Fix a bug
This commit is contained in:
parent
4f461b788e
commit
c9749698fa
1 changed files with 6 additions and 1 deletions
|
@ -427,9 +427,9 @@ public class UploadFileOperation extends SyncOperation {
|
|||
}
|
||||
|
||||
if (result.isSuccess()) {
|
||||
saveUploadedFile(client);
|
||||
|
||||
if (mLocalBehaviour == FileUploader.LOCAL_BEHAVIOUR_FORGET) {
|
||||
|
||||
String temporalPath = FileStorageUtils.getTemporalPath(mAccount.name) + mFile.getRemotePath();
|
||||
if (mOriginalStoragePath.equals(temporalPath)) {
|
||||
// delete local file is was pre-copied in temporary folder (see .ui.helpers.UriUploader)
|
||||
|
@ -437,10 +437,13 @@ public class UploadFileOperation extends SyncOperation {
|
|||
temporalFile.delete();
|
||||
}
|
||||
mFile.setStoragePath("");
|
||||
saveUploadedFile(client);
|
||||
|
||||
|
||||
} else if (mLocalBehaviour == FileUploader.LOCAL_BEHAVIOUR_DELETE) {
|
||||
originalFile.delete();
|
||||
getStorageManager().deleteFileInMediaScan(originalFile.getAbsolutePath());
|
||||
saveUploadedFile(client);
|
||||
} else {
|
||||
mFile.setStoragePath(expectedPath);
|
||||
|
||||
|
@ -458,6 +461,8 @@ public class UploadFileOperation extends SyncOperation {
|
|||
}
|
||||
getStorageManager().deleteFileInMediaScan(originalFile.getAbsolutePath());
|
||||
}
|
||||
mFile.setStoragePath(expectedFile.getAbsolutePath());
|
||||
saveUploadedFile(client);
|
||||
FileDataStorageManager.triggerMediaScan(expectedFile.getAbsolutePath());
|
||||
}
|
||||
} else if (result.getCode() == ResultCode.SYNC_CONFLICT) {
|
||||
|
|
Loading…
Reference in a new issue