File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed
app/src/main/kotlin/org/fossify/filemanager/activities Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1515
1616- Fixed accidental rendering of pull-to-refresh indicator ([ #27 ] )
1717- Pull-to-refresh setting is now applied as expected ([ #136 ] )
18+ - Preserve modified date when unzip files ([ #176 ] )
1819
1920## [ 1.0.1] - 2024-03-17
2021
@@ -43,3 +44,4 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
4344
4445[ #27 ] : https://github.com/FossifyOrg/File-Manager/issues/27
4546[ #136 ] : https://github.com/FossifyOrg/File-Manager/issues/136
47+ [ #176 ] : https://github.com/FossifyOrg/File-Manager/issues/176
Original file line number Diff line number Diff line change @@ -171,7 +171,9 @@ class DecompressActivity : SimpleActivity() {
171171 continue
172172 }
173173
174- val isVulnerableForZipPathTraversal = ! File (newPath).canonicalPath.startsWith(parent)
174+ val outputFile = File (newPath)
175+
176+ val isVulnerableForZipPathTraversal = ! outputFile.canonicalPath.startsWith(parent)
175177 if (isVulnerableForZipPathTraversal) {
176178 continue
177179 }
@@ -187,6 +189,7 @@ class DecompressActivity : SimpleActivity() {
187189 fos!! .write(buffer, 0 , count)
188190 }
189191 fos!! .close()
192+ outputFile.setLastModified(entry.lastModifiedTimeEpoch)
190193 }
191194
192195 toast(R .string.decompression_successful)
You can’t perform that action at this time.
0 commit comments