[armedbear] #452: Pathname functions do the wrong thing when faced with actual filename with embedded asterisk
armedbear
armedbear-devel at common-lisp.net
Tue Sep 12 06:20:18 UTC 2017
#452: Pathname functions do the wrong thing when faced with actual filename with
embedded asterisk
----------------------+----------------------
Reporter: mevenson | Owner:
Type: defect | Status: new
Priority: major | Milestone:
Component: (A)MOP | Version:
Keywords: | Parent Tickets:
----------------------+----------------------
From <https://github.com/armedbear/abcl/issues/63>
In a shell:
{{{
touch /tmp/*
(probe-file "/tmp/")
; Evaluation aborted on #<FILE-ERROR {7DF4B809}>.
CL-USER> (probe-file "/tmp/\")
; Evaluation aborted on #<FILE-ERROR {4D5E9779}>.
CL-USER> (probe-file "/tmp/%2A")
nil
CL-USER> (probe-file "file:///tmp/%2A")
; Evaluation aborted on #<FILE-ERROR {7DF4B809}>.
}}}
The error is: Bad place for a wild pathname.
I had a quick look to see how this could be repaired, but wasn't sure what
the right approach is. This stackoverflow answer suggests using "\" as a
quote, which is probably the best solution, and would be compatible with
what Clozure CL, SBCL and LispWorks do. I also think the percent escaped
character should be made to work.
The specific screw case I had was that there was an accidentally created
file with a "*" in a directory that was being scanned for ASDF's system
registry, which crapped out because the directory function returned the
"*" pathname, and subsequently did a probe on the file.
--
Ticket URL: <http://abcl.org/trac/ticket/452>
armedbear <http://abcl.org>
armedbear
More information about the armedbear-ticket
mailing list