harmonikit icon indicating copy to clipboard operation
harmonikit copied to clipboard

Add missing path separator

Open ghost opened this issue 11 years ago • 3 comments

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)

ghost avatar Nov 27 '13 04:11 ghost

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.

ghost avatar Nov 27 '13 12:11 ghost

tmpdir does end in slash on the Mac, which is why the original code worked for me, and this probably won't.

richhickey avatar Nov 27 '13 13:11 richhickey

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

ghost avatar Nov 27 '13 22:11 ghost