|
@@ -258,7 +258,6 @@ public class UploadFileOperation extends RemoteOperation {
|
|
(nRead = in.read(data, 0, data.length)) != -1) {
|
|
(nRead = in.read(data, 0, data.length)) != -1) {
|
|
out.write(data, 0, nRead);
|
|
out.write(data, 0, nRead);
|
|
}
|
|
}
|
|
-
|
|
|
|
out.flush();
|
|
out.flush();
|
|
|
|
|
|
} else {
|
|
} else {
|
|
@@ -278,6 +277,11 @@ public class UploadFileOperation extends RemoteOperation {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ if (mCancellationRequested.get()) {
|
|
|
|
+ result = new RemoteOperationResult(new OperationCancelledException());
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
result = new RemoteOperationResult(ResultCode.LOCAL_STORAGE_NOT_COPIED);
|
|
result = new RemoteOperationResult(ResultCode.LOCAL_STORAGE_NOT_COPIED);
|
|
return result;
|
|
return result;
|
|
@@ -300,7 +304,7 @@ public class UploadFileOperation extends RemoteOperation {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- localCopyPassed = true;
|
|
|
|
|
|
+ localCopyPassed = result.isSuccess();
|
|
|
|
|
|
/// perform the upload
|
|
/// perform the upload
|
|
if ( mChunked &&
|
|
if ( mChunked &&
|