[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: There are still bugs in dirname(3) (glibc 2.2.3.pre1)
From: |
Andreas Schwab |
Subject: |
Re: There are still bugs in dirname(3) (glibc 2.2.3.pre1) |
Date: |
02 Apr 2001 11:14:39 +0200 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.0.101 |
"Michael Kerrisk" <address@hidden> writes:
|> Gidday,
|>
|> A while back I submitted a patch for dirname(3) for glibc 2.2.1, which was
|> not correctly handling the case of trailing slashes in pathnames. The
|> version is glibc 2.2.3pre1 is improved, but still broken. SUSv2 says
|>
|> "Trailing '/' character**s** in the path are not counted as
|> part of the path"
|>
|> Note the plural! (As usual for Unix pathnames, repeated slashes are
|> equivalent to a single slash). Thus the 2.2.3pre1 version of dirname(3),
|> given the following paths:
|>
|> returns Should return
|> a// a .
|> a//// a// .
|> ////a /// /
Note that // at the *beginning* of a filename is still special and must be
preserved.
Andreas.
--
Andreas Schwab "And now for something
SuSE Labs completely different."
address@hidden
SuSE GmbH, Schanzäckerstr. 10, D-90443 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5