Merge pull request #1673 from owncloud/favorite_edited_file

Fixed: favorite setting not remembered when modifying a local file
This commit is contained in:
David A. Velasco 2016-05-18 12:29:33 +02:00
commit b7275d4bbf
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;