Fixed #6091 - Changed POSIX path matching to allow multiple leading slashes
According to
http://pubs.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap03.html#tag_03_266:
"Multiple successive slashes are considered to be the same as one
slash.", so '//tmp/xxx' is a valid POSIX pathname.
Thomas Bellman adds:
You should probably read section 3.2 then as well: 3.2 Absolute Pathname A pathname beginning with a single or more than two slashes; see also Pathname. Note that a pathname starting with exactly two slashes is *not* an absolute pathname according to Posix. And 4.11 (Pathname Resolution) says: 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. Posix has this rule to accomodate DomainOS, which was a Unix- like OS from Apollo, where paths on the form "//foo/bar/gazonk" meant the file "/bar/gazonk" on the machine named "foo". You may recognize this format from URLs, or MS Windows SMB paths (with backslashes instead of forward slashes).
This ignores that complication, since none of our supported platforms treat
the '//' form as significant.
Signed-off-by: James Turnbull <james@lovedthanlost.net>
Signed-off-by: Daniel Pittman <daniel@puppetlabs.com>
Signed-off-by: Rick Bradley <rick@rickbradley.com>