X Tutup
Skip to content

Commit 4640dc6

Browse files
author
zhourenjian@gmail.com
committed
Make sure target folder is existed or create target folder
1 parent 26faf09 commit 4640dc6

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

sources/net.sf.j2s.lib/src/net/sf/j2s/lib/build/SmartJSCompressor.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,10 @@ public static void main(String[] args) throws IOException {
188188
source = RegExCompress.regexCompress2(source);
189189
}
190190

191+
File folder = new File(dest).getParentFile();
192+
if (!folder.exists()) {
193+
folder.mkdirs();
194+
}
191195
FileOutputStream fos = new FileOutputStream(dest);
192196
fos.write(new byte[] {(byte) 0xef, (byte) 0xbb, (byte) 0xbf}); // UTF-8 header!
193197
fos.write(source.getBytes("utf-8"));

0 commit comments

Comments
 (0)
X Tutup