projects
/
pub
/
Android
/
ownCloud.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Bug fixed: Upload fails
[pub/Android/ownCloud.git]
/
src
/
com
/
owncloud
/
android
/
operations
/
UploadFileOperation.java
diff --git
a/src/com/owncloud/android/operations/UploadFileOperation.java
b/src/com/owncloud/android/operations/UploadFileOperation.java
index
7d51a4a
..
bf0d060
100644
(file)
--- a/
src/com/owncloud/android/operations/UploadFileOperation.java
+++ b/
src/com/owncloud/android/operations/UploadFileOperation.java
@@
-258,7
+258,6
@@
public class UploadFileOperation extends RemoteOperation {
(nRead = in.read(data, 0, data.length)) != -1) {
out.write(data, 0, nRead);
}
(nRead = in.read(data, 0, data.length)) != -1) {
out.write(data, 0, nRead);
}
-
out.flush();
} else {
out.flush();
} else {
@@
-278,6
+277,11
@@
public class UploadFileOperation extends RemoteOperation {
}
}
}
}
+ if (mCancellationRequested.get()) {
+ result = new RemoteOperationResult(new OperationCancelledException());
+ }
+
+
} catch (Exception e) {
result = new RemoteOperationResult(ResultCode.LOCAL_STORAGE_NOT_COPIED);
return result;
} catch (Exception e) {
result = new RemoteOperationResult(ResultCode.LOCAL_STORAGE_NOT_COPIED);
return result;
@@
-300,7
+304,7
@@
public class UploadFileOperation extends RemoteOperation {
}
}
}
}
}
}
- localCopyPassed =
true
;
+ localCopyPassed =
(result == null)
;
/// perform the upload
if ( mChunked &&
/// perform the upload
if ( mChunked &&