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
@@ -27,7 +27,7 @@ For iOS, run the command below in you app's root folder once the package has bee
27
27
  cd ./ios && pod install
28
28
  ````
29
29
 
30
- For Andriod, it's ready to go.
30
+ For Android, it's ready to go.
31
31
 
32
32
 
33
33
  ## Usage
@@ -1,7 +1,7 @@
1
1
  buildscript {
2
2
  repositories {
3
- jcenter()
4
3
  google()
4
+ mavenCentral()
5
5
  }
6
6
 
7
7
  dependencies {
@@ -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);
@@ -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%
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-zip-archive",
3
- "version": "6.0.2",
3
+ "version": "6.0.6",
4
4
  "description": "A little wrapper on ZipArchive for react-native",
5
5
  "main": "index.js",
6
6
  "scripts": {