r10042: add umask to upload scripts
[kmrcl.git] / os.lisp
diff --git a/os.lisp b/os.lisp
index 5bbfbfa4f2fbca3ff430e88dd14c9a10df46133b..cce2a2f99fe80f7b221487d08d01ad1f2a20a3c1 100644 (file)
--- a/os.lisp
+++ b/os.lisp
@@ -153,8 +153,9 @@ returns (VALUES output-string pid)"
                    (error "Directory ~A does not exist [delete-directory-and-files]." dir))))
 
 (defun file-size (file)
-  #+allegro (let ((stat (excl.osi:stat (namestring file))))
-             (excl.osi:stat-size stat))
-  #-allegro
-  (with-open-file (in file :direction :input)
-    (file-length in)))
+  (when (probe-file file)
+    #+allegro (let ((stat (excl.osi:stat (namestring file))))
+               (excl.osi:stat-size stat))
+    #-allegro
+    (with-open-file (in file :direction :input)
+      (file-length in))))