[Cl-darcs-cvs] r137 - cl-darcs/trunk

mhenoch at common-lisp.net mhenoch at common-lisp.net
Wed Sep 5 21:55:23 UTC 2007


Author: mhenoch
Date: Wed Sep  5 17:55:23 2007
New Revision: 137

Modified:
   cl-darcs/trunk/util.lisp
Log:
PATHNAME-SANE-P: pathnames without directory components are sane


Modified: cl-darcs/trunk/util.lisp
==============================================================================
--- cl-darcs/trunk/util.lisp	(original)
+++ cl-darcs/trunk/util.lisp	Wed Sep  5 17:55:23 2007
@@ -228,9 +228,10 @@
 (defun pathname-sane-p (pathname)
   "Return true if PATHNAME is a relative path going strictly down."
   (let ((directory (pathname-directory pathname)))
-    (and (listp directory)
-	 (eql (car directory) :relative)
-	 (every #'stringp (cdr directory)))))
+    (or (null directory)
+	(and (listp directory)
+	     (eql (car directory) :relative)
+	     (every #'stringp (cdr directory))))))
 
 (defun pathname-to-string (pathname)
   "Convert PATHNAME to a string usable in darcs patch files.



More information about the Cl-darcs-cvs mailing list