Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [PATCH] Handle double slashes in make_relative_path()

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:48:05

"Bernhard R. Link" [off-list ref] writes:
http://www.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap03.html#tag_03_266

| 3.266 Pathname
|
| A character string that is used to identify a file. In the context of
| IEEE Std 1003.1-2001, a pathname consists of, at most, {PATH_MAX} bytes,
| including the terminating null byte. It has an optional beginning
| slash, followed by zero or more filenames separated by slashes. A
| pathname may optionally contain one or more trailing slashes.
| Multiple successive slashes are considered to be the same as one
| slash.
Which is a bit stale, and there is an update that is crucial when
discussing the issue that is the topic of this thread.

Try this one instead, especially the last ", except for" which is an
important clarification.

http://www.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html

| 3.266 Pathname
| 
| A character string that is used to identify a file. In the context of
| POSIX.1-2008, a pathname may be limited to {PATH_MAX} bytes, including the
| terminating null byte. It has an optional beginning <slash>, followed by
| zero or more filenames separated by <slash> characters. A pathname may
| optionally contain one or more trailing <slash> characters. Multiple
| successive <slash> characters are considered to be the same as one
| <slash>, except for the case of exactly two leading <slash> characters.

And 4.12 in the same issue of POSIX says pathnames with exactly two
leading slashes may be handled in an implemenation defined manner
(i.e. three or more means the same thing as a single slash).  Confusing
;-)
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help