Opened 9 years ago

Last modified 3 years ago

#452 new defect

Pathname functions do the wrong thing when faced with actual filename with embedded asterisk

Reported by: Mark Evenson Owned by:
Priority: major Milestone: 1.9.3
Component: java Version: 1.5.0-dev
Keywords: Cc:
Parent Tickets:

Description

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.

Change History (10)

comment:1 by Mark Evenson, 9 years ago

Component: (A)MOP → java
Milestone: → 1.6.0
Version: → 1.5.0-dev

comment:2 by Mark Evenson, 7 years ago

Milestone: 1.6.0 → 1.6.1

Ticket retargeted after milestone closed

comment:3 by Mark Evenson, 6 years ago

Milestone: 1.6.1 → 1.6.2

Ticket retargeted after milestone closed

comment:4 by Mark Evenson, 6 years ago

Milestone: 1.6.2 → 1.7.0

comment:5 by Mark Evenson, 6 years ago

Milestone: 1.7.0 → 1.7.1

Ticket retargeted after milestone closed

comment:6 by Mark Evenson, 6 years ago

Milestone: 1.7.1 → 1.7.2

Ticket retargeted after milestone closed

comment:7 by Mark Evenson, 6 years ago

Milestone: 1.7.2 → 1.8.0

Milestone renamed

comment:8 by Mark Evenson, 6 years ago

Milestone: 1.8.0 → 1.8.1

Ticket retargeted after milestone closed

comment:9 by Mark Evenson, 4 years ago

Milestone: 1.8.1 → 1.9.2

comment:10 by Mark Evenson, 3 years ago

Milestone: 1.9.2 → 1.9.3
Note: See TracTickets for help on using tickets.