mirror of
https://github.com/nextcloud/android.git
synced 2024-11-24 06:05:42 +03:00
Fix deleted file update in media scanner
This commit is contained in:
parent
04dc4b2f45
commit
e615b9a20d
1 changed files with 5 additions and 6 deletions
|
@ -379,16 +379,15 @@ public class UploadFileOperation extends SyncOperation {
|
||||||
mFile.setStoragePath("");
|
mFile.setStoragePath("");
|
||||||
} else {
|
} else {
|
||||||
mFile.setStoragePath(expectedPath);
|
mFile.setStoragePath(expectedPath);
|
||||||
File fileToMove;
|
|
||||||
if (temporalFile != null) { // FileUploader.LOCAL_BEHAVIOUR_COPY
|
if (temporalFile != null) { // FileUploader.LOCAL_BEHAVIOUR_COPY
|
||||||
fileToMove = temporalFile;
|
move(temporalFile, expectedFile);
|
||||||
} else { // FileUploader.LOCAL_BEHAVIOUR_MOVE
|
} else { // FileUploader.LOCAL_BEHAVIOUR_MOVE
|
||||||
fileToMove = originalFile;
|
move(originalFile, expectedFile);
|
||||||
|
getStorageManager().deleteFileInMediaScan(originalFile.getAbsolutePath());
|
||||||
}
|
}
|
||||||
move(fileToMove, expectedFile);
|
|
||||||
}
|
|
||||||
FileDataStorageManager.triggerMediaScan(originalFile.getAbsolutePath());
|
|
||||||
FileDataStorageManager.triggerMediaScan(expectedFile.getAbsolutePath());
|
FileDataStorageManager.triggerMediaScan(expectedFile.getAbsolutePath());
|
||||||
|
}
|
||||||
|
|
||||||
} else if (result.getHttpCode() == HttpStatus.SC_PRECONDITION_FAILED ) {
|
} else if (result.getHttpCode() == HttpStatus.SC_PRECONDITION_FAILED ) {
|
||||||
result = new RemoteOperationResult(ResultCode.SYNC_CONFLICT);
|
result = new RemoteOperationResult(ResultCode.SYNC_CONFLICT);
|
||||||
|
|
Loading…
Reference in a new issue