Skip to content

Commit

Permalink
Revert changes for onBrowseUp
Browse files Browse the repository at this point in the history
Signed-off-by: alperozturk <[email protected]>
  • Loading branch information
alperozturk96 committed Oct 31, 2023
1 parent ef7fe45 commit 59f9233
Showing 1 changed file with 8 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -885,24 +885,18 @@ public int onBrowseUp() {
String parentPath = null;
if (mFile.getParentId() != FileDataStorageManager.ROOT_PARENT_ID) {
parentPath = new File(mFile.getRemotePath()).getParent();
if (parentPath != null) {
parentPath = parentPath.endsWith(OCFile.PATH_SEPARATOR) ? parentPath :
parentPath + OCFile.PATH_SEPARATOR;
}
parentDir = storageManager.getFileByEncryptedRemotePath(parentPath);
parentPath = parentPath.endsWith(OCFile.PATH_SEPARATOR) ? parentPath :
parentPath + OCFile.PATH_SEPARATOR;
parentDir = storageManager.getFileByPath(parentPath);
moveCount++;
} else {
parentDir = storageManager.getFileByEncryptedRemotePath(ROOT_PATH);
parentDir = storageManager.getFileByPath(ROOT_PATH);
}
while (parentDir == null) {
if (parentPath != null) {
parentPath = new File(parentPath).getParent();
}
if (parentPath != null) {
parentPath = parentPath.endsWith(OCFile.PATH_SEPARATOR) ? parentPath :
parentPath + OCFile.PATH_SEPARATOR;
}
parentDir = storageManager.getFileByEncryptedRemotePath(parentPath);
parentPath = new File(parentPath).getParent();
parentPath = parentPath.endsWith(OCFile.PATH_SEPARATOR) ? parentPath :
parentPath + OCFile.PATH_SEPARATOR;
parentDir = storageManager.getFileByPath(parentPath);
moveCount++;
} // exit is granted because storageManager.getFileByPath("/") never returns null
mFile = parentDir;
Expand Down

0 comments on commit 59f9233

Please sign in to comment.