mirror of
https://github.com/SimpleMobileTools/Simple-File-Manager.git
synced 2025-04-17 03:37:19 +02:00
create a directory at decompressing, if needed
This commit is contained in:
parent
a14919d6d9
commit
09345dba49
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user