react-native-zip-archive 6.0.2 → 6.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
package/android/build.gradle
CHANGED
|
@@ -95,8 +95,8 @@ public class RNZipArchiveModule extends ReactContextBaseJavaModule {
|
|
|
95
95
|
throw new SecurityException(String.format("Found Zip Path Traversal Vulnerability with %s", canonicalPath));
|
|
96
96
|
}
|
|
97
97
|
|
|
98
|
-
zipFile.extractFile(fileHeader, destDirectory);
|
|
99
98
|
if (!fileHeader.isDirectory()) {
|
|
99
|
+
zipFile.extractFile(fileHeader, destDirectory);
|
|
100
100
|
extractedFileNames.add(fileHeader.getFileName());
|
|
101
101
|
}
|
|
102
102
|
updateProgress(i + 1, totalFiles, zipFilePath);
|
package/ios/RNZipArchive.m
CHANGED
|
@@ -60,7 +60,7 @@ RCT_EXPORT_METHOD(unzip:(NSString *)from
|
|
|
60
60
|
|
|
61
61
|
NSError *error = nil;
|
|
62
62
|
|
|
63
|
-
BOOL success = [SSZipArchive unzipFileAtPath:from toDestination:destinationPath overwrite:YES password:nil error:&error delegate:self];
|
|
63
|
+
BOOL success = [SSZipArchive unzipFileAtPath:from toDestination:destinationPath preserveAttributes:NO overwrite:YES password:nil error:&error delegate:self];
|
|
64
64
|
|
|
65
65
|
self.progress = 1.0;
|
|
66
66
|
[self zipArchiveProgressEvent:1 total:1]; // force 100%
|
|
@@ -83,7 +83,7 @@ RCT_EXPORT_METHOD(unzipWithPassword:(NSString *)from
|
|
|
83
83
|
|
|
84
84
|
NSError *error = nil;
|
|
85
85
|
|
|
86
|
-
BOOL success = [SSZipArchive unzipFileAtPath:from toDestination:destinationPath overwrite:YES password:password error:&error delegate:self];
|
|
86
|
+
BOOL success = [SSZipArchive unzipFileAtPath:from toDestination:destinationPath preserveAttributes:NO overwrite:YES password:password error:&error delegate:self];
|
|
87
87
|
|
|
88
88
|
self.progress = 1.0;
|
|
89
89
|
[self zipArchiveProgressEvent:1 total:1]; // force 100%
|