mirror of
https://gitee.com/BDWare/common
synced 2025-04-27 22:42:19 +00:00
fix: unpackInternal bug
This commit is contained in:
parent
43282a3201
commit
f0c75d4b3c
@ -275,12 +275,21 @@ public class YJSPacker {
|
|||||||
if (!parent.exists()) {
|
if (!parent.exists()) {
|
||||||
LOGGER.trace("create directory " + parent.getAbsolutePath() + ": " + parent.mkdirs());
|
LOGGER.trace("create directory " + parent.getAbsolutePath() + ": " + parent.mkdirs());
|
||||||
}
|
}
|
||||||
FileOutputStream fout = new FileOutputStream(target);
|
if (!target.exists()) {
|
||||||
for (int k; (k = zin.read(buff)) > 0; ) {
|
if (entry.isDirectory()) {
|
||||||
fout.write(buff, 0, k);
|
target.mkdirs();
|
||||||
|
} else {
|
||||||
|
target.createNewFile();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!entry.isDirectory()) {
|
||||||
|
FileOutputStream fout = new FileOutputStream(target);
|
||||||
|
for (int k; (k = zin.read(buff)) > 0; ) {
|
||||||
|
fout.write(buff, 0, k);
|
||||||
|
}
|
||||||
|
fout.close();
|
||||||
|
zin.closeEntry();
|
||||||
}
|
}
|
||||||
fout.close();
|
|
||||||
zin.closeEntry();
|
|
||||||
}
|
}
|
||||||
zin.close();
|
zin.close();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user