Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.

fix: fix new File by only fileName #2149

Merged
merged 1 commit into from
Oct 11, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ public static void unzipFile(File zipFile, String destination) throws IOExceptio
byte[] buffer = new byte[WRITE_BUFFER_SIZE];
while ((entry = zipStream.getNextEntry()) != null) {
String fileName = validateFileName(entry.getName(), destinationFolder);
File file = new File(destinationFolder, fileName);
File file = new File(fileName);
if (entry.isDirectory()) {
file.mkdirs();
} else {
Expand Down