Merge remote-tracking branch 'remotes/upstream/descendIntoFolder' into beta
authortobiasKaminsky <tobias@kaminsky.me>
Fri, 13 Nov 2015 16:41:49 +0000 (17:41 +0100)
committertobiasKaminsky <tobias@kaminsky.me>
Fri, 13 Nov 2015 16:41:49 +0000 (17:41 +0100)
src/com/owncloud/android/operations/CreateFolderOperation.java
src/com/owncloud/android/ui/activity/Uploader.java

index b020b92..0b3343c 100644 (file)
@@ -121,4 +121,8 @@ public class CreateFolderOperation extends SyncOperation implements OnRemoteOper
             Log_OC.d(TAG, "Create directory " + mRemotePath + " in Database");
         }
     }
+
+    public String getRemotePath() {
+        return mRemotePath;
+    }
 }
index 0194092..37363e4 100644 (file)
@@ -605,6 +605,10 @@ public class Uploader extends FileActivity
     private void onCreateFolderOperationFinish(CreateFolderOperation operation,
                                                RemoteOperationResult result) {
         if (result.isSuccess()) {
+            dismissLoadingDialog();
+            String remotePath = operation.getRemotePath().substring(0, operation.getRemotePath().length() -1);
+            String newFolder = remotePath.substring(remotePath.lastIndexOf("/") + 1);
+            mParents.push(newFolder);
             populateDirectoryList();
         } else {
             try {