Fix. Favorite setting is not remembered when modifying the local file

This commit is contained in:
jabarros 2016-05-12 10:48:52 +02:00
parent 37c96a4fb0
commit 64c6e90724
2 changed files with 12 additions and 5 deletions

View file

@ -493,6 +493,7 @@ public class FileUploader extends Service
newUpload = new UploadFileOperation(
account,
files[i],
ocUpload,
chunked,
forceOverwrite,
@ -546,6 +547,7 @@ public class FileUploader extends Service
UploadFileOperation newUpload = new UploadFileOperation(
account,
null,
upload,
chunked,
upload.isForceOverwrite(), // TODO should be read from DB?

View file

@ -138,6 +138,7 @@ public class UploadFileOperation extends SyncOperation {
protected RequestEntity mEntity = null;
public UploadFileOperation(Account account,
OCFile file,
OCUpload upload,
boolean chunked,
boolean forceOverwrite,
@ -156,11 +157,15 @@ public class UploadFileOperation extends SyncOperation {
}
mAccount = account;
mFile = obtainNewOCFileToUpload(
upload.getRemotePath(),
upload.getLocalPath(),
upload.getMimeType()
);
if (file == null) {
mFile = obtainNewOCFileToUpload(
upload.getRemotePath(),
upload.getLocalPath(),
upload.getMimeType()
);
} else {
mFile = file;
}
mRemotePath = upload.getRemotePath();
mChunked = chunked;
mForceOverwrite = forceOverwrite;