DIRECTORY loses when *DEFAULT-PATHNAME-DEFAULTS* has a non-NIL name, type.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SBCL |
Fix Released
|
Medium
|
Unassigned |
Bug Description
DIRECTORY loses in various ways when *DEFAULT-
--
$ sh ./run-sbcl.sh --no-userinit --no-sysinit
(running SBCL from: .)
This is SBCL 1.4.3.20-1af2446, an implementation of ANSI Common Lisp.
More information about SBCL is available at <http://
SBCL is free software, provided as is, with absolutely no warranty.
It is mostly in the public domain; some portions are provided under
BSD-style licenses. See the CREDITS and COPYING files in the
distribution for more information.
* (ensure-
creating directory: /tmp/dir/
"/tmp/dir/"
T
* (close (open "/tmp/dir/a.txt" :if-does-not-exist :create))
T
* (close (open "/tmp/dir/b.lisp" :if-does-not-exist :create))
T
* (directory "/tmp/dir/*.*")
(#P"/private/
* (setq *default-
#P"/tmp/dir/a.txt"
* (directory #p"/tmp/dir/*.*")
NIL
* (setq *default-
#<PATHNAME (with no namestring)
:HOST #<SB-IMPL:
:DEVICE NIL
:NAME NIL
:TYPE "txt"
:VERSION :NEWEST>
* (directory #p"/tmp/dir/*.*")
debugger invoked on a SB-KERNEL:
#<THREAD "main thread" RUNNING {1001968083}>:
The pathname
#<PATHNAME (with no namestring)
:HOST #<SB-IMPL:
:NAME NIL
:TYPE "txt"
does not have a native namestring because
there is a :TYPE component but no :NAME component
Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.
restarts (invokable by number or by possibly-
0: [ABORT] Exit debugger, returning to top level.
(SB-KERNEL:
0] :abort
* (setq *default-
#P"/tmp/dir/a"
* (directory #p"/tmp/dir/*.*")
NIL
--
I expected DIRECTORY to return the same list of two pathnames in all cases.
One way of looking at the problem is that the internals of DIRECTORY parses directories into pathnames in "as-directory" form (i.e., the form where the name, type, and version are NIL), and so any operation that merges those directories when *DEFAULT-
Other requested info:
--
$ uname -a
Darwin m5.localdomain 14.5.0 Darwin Kernel Version 14.5.0: Wed Jul 29 02:26:53 PDT 2015; root:xnu-
* *features*
(:64-BIT :64-BIT-REGISTERS :ALIEN-CALLBACKS :ANSI-CL :ASH-RIGHT-VOPS :BSD
:C-STACK-
:COMPARE-
:DARWIN9-OR-BETTER :FLOAT-EQL-VOPS :FP-AND-
:IEEE-
:INTEGER-EQL-VOP :LINKAGE-TABLE :LITTLE-ENDIAN :MACH-EXCEPTION
:MEMORY-
:OS-PROVIDES-
:OS-PROVIDES-
:RAW-INSTANCE-
:SB-LDB :SB-PACKAGE-LOCKS :SB-SIMD-PACK :SB-SOURCE-
:SB-UNICODE :SBCL :STACK-
:STACK-
:STACK-
:UNBIND-N-VOP :UNDEFINED-
:X86-64)
--
Changed in sbcl: | |
assignee: | nobody → Jan Moringen (scymtym) |
status: | New → Confirmed |
importance: | Undecided → Medium |
Changed in sbcl: | |
status: | Confirmed → Fix Committed |
assignee: | Jan Moringen (scymtym) → nobody |
Changed in sbcl: | |
status: | Fix Committed → Fix Released |