diff options
author | Rich Hickey <richhickey@gmail.com> | 2008-11-28 17:52:40 +0000 |
---|---|---|
committer | Rich Hickey <richhickey@gmail.com> | 2008-11-28 17:52:40 +0000 |
commit | 09c2d0dd2eff4fbe7962d6f68492d3dc1e07d4ff (patch) | |
tree | 1698e8259937701f295b5f89e86920359f3b190d /src | |
parent | 2adf03dc22be0cf9caf93b4999528b3a06eb9002 (diff) |
create child dirs of *compile-path* but not *compile-path* itself
Diffstat (limited to 'src')
-rw-r--r-- | src/jvm/clojure/lang/Compiler.java | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/jvm/clojure/lang/Compiler.java b/src/jvm/clojure/lang/Compiler.java index 24cc87df..5d5c7b9e 100644 --- a/src/jvm/clojure/lang/Compiler.java +++ b/src/jvm/clojure/lang/Compiler.java @@ -4450,9 +4450,15 @@ static public void writeClassFile(String internalName, byte[] bytecode) throws E String genPath = (String) COMPILE_PATH.get(); if(genPath == null) throw new Exception("*compile-path* not set"); + String[] dirs = internalName.split("/"); + String p = genPath; + for(int i=0;i<dirs.length-1;i++) + { + p += File.separator + dirs[i]; + (new File(p)).mkdir(); + } String path = genPath + File.separator + internalName + ".class"; File cf = new File(path); - cf.getParentFile().mkdirs(); cf.createNewFile(); OutputStream cfs = new FileOutputStream(cf); try |