The language in POSIX/SUS that makes two, but not more than two, slashes implementation defined is undoubtedly a political compromise with some system that at the time was commercially viable and did not implement it the normal way. It is easily confirmed that on Linux, any number of slashes is equivalent to one slash, so that is their implementation defined behavior, and that is consistent with the other Unix systems I am familiar with.
Do whatever you like to fix whatever the problem is. I have spent all the time on this I am going to spend. On 06/10/2010 08:00 AM, Josef Reidinger wrote: > Marty Jack write: >> I believe some things are being confused here. >> >> The moment you mention Samba shares, you get into the realm of URIs. These >> are well defined and do have requirements about the early slashes. These >> are specified in RFC 3986 Section 3, where you have either one or two >> slashes as part of the syntax following the scheme name. Then, everything >> between there and the question mark or hash mark is scheme specific. >> >> This is separate from the question of what is a valid path that can be >> passed to open(2) or any of the other system calls that operate on paths. >> These take an arbitrary number of slashes as equivalent to one slash. For >> example you can do ls -l ///////////////// and get the same result as ls -l >> /. > > Yes, but it is not true for // see > http://www.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap04.html quote: > "A pathname consisting of a single slash shall resolve to the root directory > of the process. A null pathname shall not be successfully resolved. A > pathname that begins with two successive slashes may be interpreted in an > implementation-defined manner, although more than two leading slashes shall > be treated as a single slash." > >> >> And finally, if you invoke the file scheme with file:/ , as defined by RFC >> 1738 Section 3.10, the syntax after that is another slash, optional >> hostname, slash, path, so would fall under the above rule. This is easily >> tested if you open file:////////etc/////asound.conf in a browser. >> >> http://www.ietf.org/rfc/rfc3986.txt >> http://www.ietf.org/rfc/rfc1738.txt >> >> ------------------------------------------------------------------------------ >> ThinkGeek and WIRED's GeekDad team up for the Ultimate >> GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the >> lucky parental unit. See the prize list and enter to win: >> http://p.sf.net/sfu/thinkgeek-promo >> _______________________________________________ >> Lxde-list mailing list >> Lxde-list@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/lxde-list >> > ------------------------------------------------------------------------------ ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit. See the prize list and enter to win: http://p.sf.net/sfu/thinkgeek-promo _______________________________________________ Lxde-list mailing list Lxde-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lxde-list