Browse Source

FolderPickerActivity: properly compare subfolders

Need to use File as well, otherwise trailing slashes are different

Signed-off-by: Álvaro Brey <alvaro.brey@nextcloud.com>
Álvaro Brey 2 năm trước cách đây
mục cha
commit
a824d9a7b5

+ 1 - 1
app/src/main/java/com/owncloud/android/ui/activity/FolderPickerActivity.kt

@@ -363,7 +363,7 @@ open class FolderPickerActivity :
     }
 
     private fun isParentFolder(folderPath: String, filePath: String): Boolean {
-        return folderPath == File(filePath).parent
+        return File(folderPath).path == File(filePath).parent
     }
 
     private fun updateNavigationElementsInActionBar() {