Skip to content

Commit 957c023

Browse files
author
Jan Guegel
committed
fix removing double getIsPathDirectory code
1 parent 167fd98 commit 957c023

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

app/src/main/kotlin/org/fossify/filemanager/adapters/ItemsAdapter.kt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -831,6 +831,16 @@ class ItemsAdapter(
831831
val base = "${mainFilePath.getParentPath()}/"
832832
res = zout
833833
queue.push(mainFilePath)
834+
if (activity.getIsPathDirectory(mainFilePath)) {
835+
name = "${mainFilePath.getFilenameFromPath()}/"
836+
val dirModified = File(mainFilePath).lastModified()
837+
zout.putNextEntry(
838+
ZipParameters().also {
839+
it.fileNameInZip = name
840+
it.lastModifiedFileTime = dirModified
841+
}
842+
)
843+
}
834844

835845
while (!queue.isEmpty()) {
836846
mainFilePath = queue.pop()

0 commit comments

Comments
 (0)