[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: split-path weirdness on Windows with UNC paths



Quoting Hannu Koivisto:
> Greetings,
> 
> With DrScheme v102 running in Windows NT 4.0
> 
>  >mzscheme
> Welcome to MzScheme version 102, Copyright (c) 1995-2000 PLT (Matthew Flatt)
>  > (split-path "//lancaster/prj/")
> #f
> "//lancaster/prj/"
> #t
> 

I claim that this is correct, on the grounds that "//lancaster/prj/" is
a volume name (just like "c:/"). 

>  > (split-path "//lancaster")
> "/"
> "lancaster"
> #f

This one is questionable. Windows certainly won't parse \\lancaster in
the same way as \lancaster. On some variants of Windows (e.g., 2000),
\\lancaster doesn't even parse. On others (e.g., 98), it parses but
seems to be useless (always gives me a "network error").

Ok, how about \\\lancaster? It seems to parse in Windows 2000, but I
don't know what it means. Maybe it means volume "lancaster" on machine
""...

I guess we could change MzScheme to make "//lancaster" an illegal
pathname, if it's worthwhile. Currently, MzScheme's rule is that
"//<something>/<something>" starts a UNC pathname, and anything else is
subject to redundant-slash elminiation (even if the slashes occur at
the beginning of the path).

Matthew