Invalid error for ENSURE-DIRECTORIES-EXIST
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
| SBCL |
Undecided
|
Unassigned |
Bug Description
Debian sid x64, SBCL 2.0.6
* (make-pathname :directory '(:absolute "tmp" "foo" "Bar/baz"))
#P"/tmp/
* (ensure-
debugger invoked on a SB-INT:
#<THREAD "main thread" RUNNING {10008A8083}>:
Can't create directory /tmp/foo/Bar/baz/
Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.
restarts (invokable by number or by possibly-
0: [RETRY] Retry directory creation.
1: [ABORT] Exit debugger, returning to top level.
(SB-KERNEL:
The programmer error here is obviously in the created pathname, since "Bar/baz" is not a valid directory name on Linux.
However, the error message is highly misleading and led to wasted debugging hours, because the namestring in the error report "Can't create directory /tmp/foo/Bar/baz/" is the printed representation of the pathname whose namestring is equivalent to a pathname with :directory '(:absolute "tmp" "foo" "Bar" "baz"), which, in turn, is a valid directory pathname on Linux.
How should this be solved? Should the original pathname be passed to SB-KERNEL:
This is more or less a consequence of the bug described at https:/ /bugs.launchpad .net/sbcl/ +bug/1278207