Merge pull request #206 from nextcloud/descendIntoFolder

descend into folder after creating it in uploader
This commit is contained in:
Tobias Kaminsky 2016-10-06 19:25:31 +02:00 committed by GitHub
commit 166b8262d3
2 changed files with 7 additions and 0 deletions

View file

@ -121,4 +121,8 @@ public class CreateFolderOperation extends SyncOperation implements OnRemoteOper
Log_OC.d(TAG, "Create directory " + mRemotePath + " in Database"); Log_OC.d(TAG, "Create directory " + mRemotePath + " in Database");
} }
} }
public String getRemotePath() {
return mRemotePath;
}
} }

View file

@ -611,6 +611,9 @@ public class ReceiveExternalFilesActivity extends FileActivity
private void onCreateFolderOperationFinish(CreateFolderOperation operation, private void onCreateFolderOperationFinish(CreateFolderOperation operation,
RemoteOperationResult result) { RemoteOperationResult result) {
if (result.isSuccess()) { if (result.isSuccess()) {
String remotePath = operation.getRemotePath().substring(0, operation.getRemotePath().length() - 1);
String newFolder = remotePath.substring(remotePath.lastIndexOf("/") + 1);
mParents.push(newFolder);
populateDirectoryList(); populateDirectoryList();
} else { } else {
try { try {