harmonikit
harmonikit copied to clipboard
Add missing path separator
Missing slash in tmpdir path on Ubuntu 13.10, due to tmpdir not ending with a slash like it does on OS X and Windows.
CompilerException java.io.FileNotFoundException: /tmpharmonikit.scsyndef (Permission denied), compiling:(harmonikit.clj:277:1)
Ah, I'm guessing this has to do with http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4391434. I'm on Ubuntu 13.10. That would also explain why you hadn't seen this yet. I don't have access to a Mac to verify the default tmpdir ends with a slash.
tmpdir does end in slash on the Mac, which is why the original code worked for me, and this probably won't.
Double slashes in the path don't cause problems on Ubuntu. It seems like it would be best to have this logic in something like path-join, but it doesn't look like any existing library has this defined. I see that fs utils used to define fs/join [1], but it was removed from the latest version.
Do you want another pull request defining something like this within harmonikit?
[1] https://bitbucket.org/tebeka/fs/src/9a5476217d7101b1e20bf62866e8c4f368175ba1/src/fs.clj?at=default#cl-124