fs icon indicating copy to clipboard operation
fs copied to clipboard

file function broken on windows

Open glchapman opened this issue 8 years ago • 0 comments

On windows, a path of the form "/a/b/c" (or "\a\b\c") is not considered absolute (since it lacks a drive letter), so the file function will prepend the cwd, returning a bogus path.

Looking at the javadoc for java.io.File, it appears the the getCanonicalPath/getCanonicalFile methods will handle all of the OS complications for us -- they seem to handle both "." and ".." as well as relative paths (without a leading slash). Perhaps the file function could be changed to use getCanonicalFile?

glchapman avatar Nov 27 '15 21:11 glchapman