]> sourceware.org Git - newlib-cygwin.git/commit
Cygwin: dirname: fix handling of leading slashes
authorCorinna Vinschen <corinna@vinschen.de>
Wed, 29 Mar 2023 08:18:23 +0000 (10:18 +0200)
committerCorinna Vinschen <corinna@vinschen.de>
Wed, 29 Mar 2023 08:23:05 +0000 (10:23 +0200)
commit2898a359b80c18fb0c3d4122b8f40daed49ba11e
tree2b9c289a4d10ac26aebececbcdedac362b5e4b1e
parent27376c60a9b870e7ba456551165897a7408b5886
Cygwin: dirname: fix handling of leading slashes

Per https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/xbd_chap04.html:

  "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."

So more than 2 leading slashes are supposed to be folded into one,
which our dirname neglected.  Fix that.

Fixes: 24e8fc6872a3b ("* cygwin.din (basename): Export.")
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
winsup/cygwin/path.cc
winsup/cygwin/release/3.4.7
This page took 0.026501 seconds and 5 git commands to generate.