File tree 1 file changed +8
-8
lines changed
common/src/main/java/com/loohp/multichatdiscordsrvaddon/resources
1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -159,17 +159,17 @@ public void run() {
159
159
}
160
160
byte [] currentEntry = baos .toByteArray ();
161
161
162
- File folder = new File (packFolder , name ). getParentFile ( );
163
- File normalizedFolder = folder .toPath ().normalize ().toFile ();
164
- if (!normalizedFolder .toPath ().startsWith (packFolder .toPath ())) {
162
+ File file = new File (packFolder , name );
163
+ File normalizedFile = file .toPath ().normalize ().toFile ();
164
+ if (!normalizedFile .toPath ().startsWith (packFolder .toPath ())) {
165
165
throw new IOException ("Bad zip entry: " + name );
166
166
}
167
- normalizedFolder . mkdirs ();
168
- File file = new File ( normalizedFolder , fileName );
169
- if (file .exists ()) {
170
- file .delete ();
167
+ File folder = normalizedFile . getParentFile ();
168
+ folder . mkdirs ( );
169
+ if (normalizedFile .exists ()) {
170
+ normalizedFile .delete ();
171
171
}
172
- FileUtils .copy (new ByteArrayInputStream (currentEntry ), file );
172
+ FileUtils .copy (new ByteArrayInputStream (currentEntry ), normalizedFile );
173
173
}
174
174
}
175
175
} catch (Exception e ) {
You can’t perform that action at this time.
0 commit comments