diff --git a/app/src/main/kotlin/com/simplemobiletools/filemanager/pro/activities/DecompressActivity.kt b/app/src/main/kotlin/com/simplemobiletools/filemanager/pro/activities/DecompressActivity.kt index c3d4d1d8..5f02b6a5 100644 --- a/app/src/main/kotlin/com/simplemobiletools/filemanager/pro/activities/DecompressActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/filemanager/pro/activities/DecompressActivity.kt @@ -100,7 +100,18 @@ class DecompressActivity : SimpleActivity() { while (true) { val entry = zipInputStream.nextEntry ?: break val filename = title.toString().substringBeforeLast(".") - val newPath = "$destination/$filename/${entry.name.trimEnd('/')}" + val parent = "$destination/$filename" + val newPath = "$parent/${entry.name.trimEnd('/')}" + + if (!getDoesFilePathExist(parent)) { + if (!createDirectorySync(parent)) { + continue + } + } + + if (entry.isDirectory) { + continue + } val fos = getFileOutputStreamSync(newPath, newPath.getMimeType()) var count: Int