From edecbc6e37e55386550b65e7f40794164cc57e7e Mon Sep 17 00:00:00 2001 From: tibbi Date: Thu, 28 May 2020 10:31:02 +0200 Subject: [PATCH] improve folder showing at the decompressing activity --- .../filemanager/pro/activities/DecompressActivity.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 340c5ff2..5837106f 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 @@ -113,8 +113,12 @@ class DecompressActivity : SimpleActivity() { break } + if (!zipEntry.isDirectory && zipEntry.name.contains("/")) { + continue + } + val lastModified = if (isOreoPlus()) zipEntry.lastModifiedTime.toMillis() else 0 - val listItem = ListItem(zipEntry.name, zipEntry.name, zipEntry.isDirectory, 0, 0L, lastModified, false) + val listItem = ListItem(zipEntry.name.removeSuffix("/"), zipEntry.name.removeSuffix("/"), zipEntry.isDirectory, 0, 0L, lastModified, false) listItems.add(listItem) } return listItems