Skip to content

Commit a14919d

Browse files
committed
create a new folder at decompressing
1 parent 0319042 commit a14919d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

app/src/main/kotlin/com/simplemobiletools/filemanager/pro/activities/DecompressActivity.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,10 @@ class DecompressActivity : SimpleActivity() {
9999
zipInputStream.use {
100100
while (true) {
101101
val entry = zipInputStream.nextEntry ?: break
102-
val newPath = "$destination/${entry.name}"
103-
val fos = getFileOutputStreamSync(newPath, newPath.getMimeType())
102+
val filename = title.toString().substringBeforeLast(".")
103+
val newPath = "$destination/$filename/${entry.name.trimEnd('/')}"
104104

105+
val fos = getFileOutputStreamSync(newPath, newPath.getMimeType())
105106
var count: Int
106107
while (true) {
107108
count = zipInputStream.read(buffer)

0 commit comments

Comments
 (0)