file function broken on windows
Opened this issue · 0 comments
glchapman commented
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?