GNU bug report logs -
#69437
basename fails with suffix containing slash
Previous Next
To reply to this bug, email your comments to 69437 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-guile <at> gnu.org
:
bug#69437
; Package
guile
.
(Tue, 27 Feb 2024 20:26:03 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Zefram <zefram <at> fysh.org>
:
New bug report received and forwarded. Copy sent to
bug-guile <at> gnu.org
.
(Tue, 27 Feb 2024 20:26:03 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
$ guile-3.0.9 -c '(write (basename "foo/bar" "o/bar")) (newline)'
Backtrace:
[...]
ERROR: In procedure basename:
Value out of range: 18446744073709551614
Looks like this decides based on the whole pathname that the
five-character suffix matches, and then tries to remove that suffix
from the three-character basename. This is not sensible behaviour.
It should probably signal an error if given any suffix argument that
contains a slash character. If not, then it should be comparing the
suffix against the basename, not the complete pathname, with the effect
that a suffix containing a slash will never be matched and so no attempt
will be made to remove it.
-zefram
This bug report was last modified 66 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.