Wrong return value from ensure-directories-exist
Harald Hanche-Olsen <[email protected]> Sat, 05 Jul 2003 07:45:27 +0200
| Newsgroups | gmane.lisp.openmcl.bugs |
|---|---|
| Message-ID | <[email protected]> |
The following behaviour is wrong:
? (ensure-directories-exist "/tmp/foo/bar.zip")
#P"/tmp/foo/"
T
The first value returned should be the pathspec given as input to
ensure-directories-exist, not that of the directory created. This is
so that you can say, e.g.,
(open-file (ensure-directories-exist "/tmp/foo/bar.zip")
:direction :output)
- which, incidentally, is how I discovered the bug.
Fortunately, this is easy to fix:
--- ccl/lib/pathnames.lisp.ORIG Sun Apr 6 22:48:24 2003
+++ ccl/lib/pathnames.lisp Fri Jul 4 20:12:08 2003
@@ -211,7 +211,7 @@
:pathname namestring
:error-type "Can't create directory ~S."))
(setf created-p t)))))
- (values pathname created-p))))
+ (values pathspec created-p))))
(defun dirpath-to-filepath (path)
(setq path (translate-logical-pathname (merge-pathnames path)))
Please Cc any responses to me, I am not on the list.
(Hmm, maybe I should subscribe, but not until I am back from a trip.)
- Harald