On 5/24/05, nobuyoshi nakada <nobuyoshi.nakada / ge.com> wrote: > At Tue, 24 May 2005 12:22:41 +0900, > Austin Ziegler wrote in [ruby-core:05082]: > > > Do you mean that open('//server') should try to access > > > 'c:/server' where the current drive is C:? > > No. That's the bizarre part. Simply doing //server will result in an > > error. (See the result of "dir \\Windows" at the command-line). > Thank you, understood. How should we deal with that invalid path? In > UNIX convention, there's no invalid form of path. Just accessible or > not at open(2) etc. I donno. EINVAL is thrown if I open a file in my root directory with "//foo". That's probably okay enough. Interestingly, playing with this, UNC path opening works from File.open() but does not work with Dir.glob(). > > irb(main):011:0> File.dirname(File.dirname(File.dirname(unc))) > > => "\\\\server\\share" > > irb(main):012:0> File.dirname(File.dirname(File.dirname(File.dirname(unc)))) > > => "\\\\server" > You are saying the latter also should return one same as the former, > aren't you? > > $ ruby -e 'p File.dirname("//share/server")' > "//share/server" Yes. The patch looks good, but I'm not currently in a position to test it. I will dig up my old thread about wide character filenames and bump it later today. -austin -- Austin Ziegler * halostatue / gmail.com * Alternate: austin / halostatue.ca