From 6b0944de2088a12cd7dde27a7c3bd415ad09b852 Mon Sep 17 00:00:00 2001 From: qiyanlong Date: Mon, 19 Apr 2021 14:30:10 +0800 Subject: [PATCH] Update RNZipArchiveModule.java MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 解决解压带有密码的压缩包,解压文件夹中的文件,提示头文件找不到的问题。 --- android/src/main/java/com/rnziparchive/RNZipArchiveModule.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/src/main/java/com/rnziparchive/RNZipArchiveModule.java b/android/src/main/java/com/rnziparchive/RNZipArchiveModule.java index ddee1c6..8558d33 100644 --- a/android/src/main/java/com/rnziparchive/RNZipArchiveModule.java +++ b/android/src/main/java/com/rnziparchive/RNZipArchiveModule.java @@ -95,8 +95,8 @@ public void run() { throw new SecurityException(String.format("Found Zip Path Traversal Vulnerability with %s", canonicalPath)); } - zipFile.extractFile(fileHeader, destDirectory); if (!fileHeader.isDirectory()) { + zipFile.extractFile(fileHeader, destDirectory); extractedFileNames.add(fileHeader.getFileName()); } updateProgress(i + 1, totalFiles, zipFilePath);