X-Git-Url: http://git.kpe.io/?p=kmrcl.git;a=blobdiff_plain;f=os.lisp;fp=os.lisp;h=cce2a2f99fe80f7b221487d08d01ad1f2a20a3c1;hp=5bbfbfa4f2fbca3ff430e88dd14c9a10df46133b;hb=6ab952c17ac4beec2f239dda5e8cf062fc3824d2;hpb=09816397bfa39bd4b3c85e9f5fc05d30b073bacb 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))))