diff --git a/uiop/filesystem.lisp b/uiop/filesystem.lisp index 7f1e199c2be9c0d6fd7ec04160aa6b440fcece95..a04334a9a33c5c7b64378cba6d1b63aa6ceb0818 100644 --- a/uiop/filesystem.lisp +++ b/uiop/filesystem.lisp @@ -71,7 +71,7 @@ a CL pathname satisfying all the specified constraints as per ENSURE-PATHNAME" (or (ignore-errors (truename p)) ;; this is here because trying to find the truename of a directory pathname WITHOUT supplying ;; a trailing directory separator, causes an error on some lisps. - #+(or clisp gcl) (if-let (d (ensure-directory-pathname p)) (ignore-errors (truename d))))))) + #+(or clisp gcl) (if-let (d (ensure-directory-pathname p nil)) (ignore-errors (truename d))))))) (defun safe-file-write-date (pathname) "Safe variant of FILE-WRITE-DATE that may return NIL rather than raise an error." @@ -546,7 +546,7 @@ NILs." (let ((dir #+abcl extensions:*lisp-home* #+(or allegro clasp ecl mkcl) #p"SYS:" - ;;#+clisp custom:*lib-directory* ; causes failure in asdf-pathname-test(!) + #+clisp custom:*lib-directory* #+clozure #p"ccl:" #+cmucl (ignore-errors (pathname-parent-directory-pathname (truename #p"modules:"))) #+gcl system::*system-directory* diff --git a/uiop/pathname.lisp b/uiop/pathname.lisp index 2d618a58e1e702bc800e45b20fd2171b64f9b05b..15af1fb4bdfa332b4fd7a735ee14ced5c153960d 100644 --- a/uiop/pathname.lisp +++ b/uiop/pathname.lisp @@ -326,11 +326,13 @@ actually-existing directory." ((directory-pathname-p pathspec) pathspec) (t - (make-pathname :directory (append (or (normalize-pathname-directory-component - (pathname-directory pathspec)) - (list :relative)) - (list (file-namestring pathspec))) - :name nil :type nil :version nil :defaults pathspec))))) + (handler-case + (make-pathname :directory (append (or (normalize-pathname-directory-component + (pathname-directory pathspec)) + (list :relative)) + (list (file-namestring pathspec))) + :name nil :type nil :version nil :defaults pathspec) + (error (c) (call-function on-error (compatfmt "~@<error while trying to create a directory pathname for ~S: ~A~@:>") pathspec c))))))) ;;; Parsing filenames