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

mhenoch at common-lisp.net mhenoch at common-lisp.net
Wed Mar 5 07:04:31 UTC 2008


Author: mhenoch
Date: Wed Mar  5 02:04:31 2008
New Revision: 160

Modified:
   cl-darcs/trunk/pending.lisp
Log:
When adding a file, make sure that we can read it


Modified: cl-darcs/trunk/pending.lisp
==============================================================================
--- cl-darcs/trunk/pending.lisp	(original)
+++ cl-darcs/trunk/pending.lisp	Wed Mar  5 02:04:31 2008
@@ -70,6 +70,11 @@
 
     (let ((pristine-file (merge-pathnames file (upath-subdir repo '("_darcs" "pristine"))))
 	  (working-file (merge-pathnames file repo)))
+      ;; Make sure that we can read the file
+      (when (eql type :file)
+	(with-open-file (s working-file :direction :input)
+	  t))
+
       ;; XXX: does this work properly for directories?
       (when (or
 	     ;; Is file/directory already committed?



More information about the Cl-darcs-cvs mailing list