Skip to content

Commit 457da97

Browse files
committed
fix #260, properly decompress SD card files
1 parent 3ee6bbe commit 457da97

File tree

1 file changed

+6
-1
lines changed
  • app/src/main/kotlin/com/simplemobiletools/filemanager/adapters

1 file changed

+6
-1
lines changed

app/src/main/kotlin/com/simplemobiletools/filemanager/adapters/ItemsAdapter.kt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,12 @@ class ItemsAdapter(activity: SimpleActivity, var fileDirItems: MutableList<FileD
348348
val entries = zipFile.entries()
349349
while (entries.hasMoreElements()) {
350350
val entry = entries.nextElement()
351-
val newPath = "${it.getParentPath()}${entry.name}"
351+
var parentPath = it.getParentPath()
352+
if (parentPath != OTG_PATH) {
353+
parentPath = "${parentPath.trimEnd('/')}/"
354+
}
355+
356+
val newPath = "$parentPath${entry.name.trimEnd('/')}"
352357

353358
val resolution = getConflictResolution(conflictResolutions, newPath)
354359
val doesPathExist = activity.getDoesFilePathExist(newPath)

0 commit comments

Comments
 (0)