Browse Source

Fixed the crash uploading without connection

Juan Carlos González Cabrero 9 years ago
parent
commit
a3aaca9ca3
1 changed files with 3 additions and 2 deletions
  1. 3 2
      src/com/owncloud/android/operations/UploadFileOperation.java

+ 3 - 2
src/com/owncloud/android/operations/UploadFileOperation.java

@@ -337,8 +337,9 @@ public class UploadFileOperation extends SyncOperation {
             String remoteParentPath = new File(getRemotePath()).getParent();
             String remoteParentPath = new File(getRemotePath()).getParent();
             remoteParentPath = remoteParentPath.endsWith(OCFile.PATH_SEPARATOR) ?
             remoteParentPath = remoteParentPath.endsWith(OCFile.PATH_SEPARATOR) ?
                     remoteParentPath : remoteParentPath + OCFile.PATH_SEPARATOR;
                     remoteParentPath : remoteParentPath + OCFile.PATH_SEPARATOR;
-            RemoteOperationResult grantResult = grantFolderExistence(remoteParentPath, client);
-            if (!grantResult.isSuccess()) {
+            result = grantFolderExistence(remoteParentPath, client);
+            if (!result.isSuccess()) {
+
                 return result;
                 return result;
             }
             }