X-Git-Url: http://git.kpe.io/?p=kmrcl.git;a=blobdiff_plain;f=os.lisp;h=cce2a2f99fe80f7b221487d08d01ad1f2a20a3c1;hp=5bbfbfa4f2fbca3ff430e88dd14c9a10df46133b;hb=e96b017d2a09ffd9c9279cb4c2341c53f0581022;hpb=1b7f506ec98bd5b885203a3250c52603b943cee9 diff --git a/os.lisp b/os.lisp index 5bbfbfa..cce2a2f 100644 --- 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))))