mUploadOperation.addDatatransferProgressListener(listener.next());
}
if (!mCancellationRequested.get()) {
- result = mUploadOperation.execute(client, MainApp.getUserAgent());
+ result = mUploadOperation.execute(client);
/// move local temporal file or original file to its corresponding
// location in the ownCloud local folder
if (temporalFile != null && !originalFile.equals(temporalFile)) {
temporalFile.delete();
}
+ if (result == null){
+ return new RemoteOperationResult(false, 404, null);
+ }
if (result.isSuccess()) {
Log_OC.i(TAG, "Upload of " + mOriginalStoragePath + " to " + mRemotePath + ": " +
result.getLogMessage());
newFile.setModificationTimestampAtLastSyncForData(
mFile.getModificationTimestampAtLastSyncForData());
// newFile.setEtag(mFile.getEtag())
- newFile.setKeepInSync(mFile.keepInSync());
+ newFile.setFavorite(mFile.isFavorite());
newFile.setLastSyncDateForProperties(mFile.getLastSyncDateForProperties());
newFile.setLastSyncDateForData(mFile.getLastSyncDateForData());
newFile.setStoragePath(mFile.getStoragePath());
private boolean existsFile(OwnCloudClient client, String remotePath){
ExistenceCheckRemoteOperation existsOperation =
new ExistenceCheckRemoteOperation(remotePath, mContext, false);
- RemoteOperationResult result = existsOperation.execute(client, MainApp.getUserAgent());
+ RemoteOperationResult result = existsOperation.execute(client);
return result.isSuccess();
}