I'm finding that on Windows the pathname returned via a file select has the slashes the wrong way, e.g.:
C:/Documents and Settings/Alex/etc
Which means if you try and call join on that, you get:
C:/Documents and Settings/Alex/etc\foo.json
By calling expand_path, the slashes turn themselves into backward slashes - so that's how I'm working round this at the moment.
Can someone else try and replicate this problem?
Hey Alex,
AFAIK Ruby represents paths internally with forward slashes on win32. Using a standard ruby installation on win32 run this code:
CODE
puts Dir.getwd
puts File.join(Dir.getwd, "foo")
You should see all paths emitted to include forward slashes, also demonstrates proper File.join() usage.
does this help?
very best,
lloyd