mirror of
https://github.com/nextcloud/android.git
synced 2024-11-27 09:39:25 +03:00
wip
Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
This commit is contained in:
parent
304d11e590
commit
9927a649dc
2 changed files with 13 additions and 8 deletions
|
@ -1,4 +1,4 @@
|
|||
/*
|
||||
/**
|
||||
* Nextcloud Android client application
|
||||
*
|
||||
* @author Mario Danic
|
||||
|
|
|
@ -692,11 +692,15 @@ public class UploadFileOperation extends SyncOperation {
|
|||
if (!unlockFolderResult.isSuccess()) {
|
||||
return unlockFolderResult;
|
||||
}
|
||||
|
||||
} else if (result.getCode() == ResultCode.SYNC_CONFLICT) {
|
||||
getStorageManager().saveConflict(mFile, mFile.getEtagInConflict());
|
||||
}
|
||||
|
||||
// delete temporal file
|
||||
if (temporalFile != null && temporalFile.exists() && !temporalFile.delete()) {
|
||||
Log_OC.e(TAG, "Could not delete temporal file " + temporalFile.getAbsolutePath());
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -894,6 +898,11 @@ public class UploadFileOperation extends SyncOperation {
|
|||
getStorageManager().saveConflict(mFile, mFile.getEtagInConflict());
|
||||
}
|
||||
|
||||
// delete temporal file
|
||||
if (temporalFile != null && temporalFile.exists() && !temporalFile.delete()) {
|
||||
Log_OC.e(TAG, "Could not delete temporal file " + temporalFile.getAbsolutePath());
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -902,7 +911,8 @@ public class UploadFileOperation extends SyncOperation {
|
|||
RemoteOperationResult result = null;
|
||||
|
||||
if (mLocalBehaviour == FileUploader.LOCAL_BEHAVIOUR_COPY && !mOriginalStoragePath.equals(expectedPath)) {
|
||||
String temporalPath = FileStorageUtils.getInternalTemporalPath(mAccount.name, mContext) + mFile.getRemotePath();
|
||||
String temporalPath = FileStorageUtils.getInternalTemporalPath(mAccount.name, mContext) +
|
||||
mFile.getRemotePath();
|
||||
mFile.setStoragePath(temporalPath);
|
||||
File temporalFile = new File(temporalPath);
|
||||
|
||||
|
@ -979,11 +989,6 @@ public class UploadFileOperation extends SyncOperation {
|
|||
FileDataStorageManager.triggerMediaScan(newFile.getAbsolutePath());
|
||||
break;
|
||||
}
|
||||
|
||||
// delete temporal file
|
||||
String temporalPath = FileStorageUtils.getInternalTemporalPath(mAccount.name, mContext) + mFile.getRemotePath();
|
||||
temporalFile = new File(temporalPath);
|
||||
temporalFile.delete();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue