fix NEP
[pub/Android/ownCloud.git] / src / com / owncloud / android / operations / UploadFileOperation.java
index ab74e79..1b4aced 100644 (file)
@@ -325,6 +325,8 @@ public class UploadFileOperation extends RemoteOperation {
                 throw new OperationCancelledException();
             }
 
+            result = mUploadOperation.execute(client);
+
             /// move local temporal file or original file to its corresponding
             // location in the ownCloud local folder
             if (result.isSuccess()) {
@@ -373,6 +375,9 @@ public class UploadFileOperation extends RemoteOperation {
             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());