From 8a3305b0c176cac349e28c0e9db54102e7564eaa Mon Sep 17 00:00:00 2001 From: toy <toy> Date: Thu, 30 Jan 2003 17:18:59 +0000 Subject: [PATCH] From Eric Marsden: Trying to save-lisp to a filename whose directory component doesn't exist will currently generate a "bad address" error from Unix. * add some sanity checking to the output file argument to EXT:SAVE-LISP. --- code/save.lisp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/code/save.lisp b/code/save.lisp index 62b2d2cfa..e3615c761 100644 --- a/code/save.lisp +++ b/code/save.lisp @@ -5,7 +5,7 @@ ;;; Carnegie Mellon University, and has been placed in the public domain. ;;; (ext:file-comment - "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/save.lisp,v 1.45 2003/01/29 19:47:47 toy Exp $") + "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/save.lisp,v 1.46 2003/01/30 17:18:59 toy Exp $") ;;; ;;; ********************************************************************** ;;; @@ -162,6 +162,11 @@ switch will invoke batch-mode processing. If true, the produced core will always be in batch-mode, regardless of any command-line switches." + (unless (probe-file (directory-namestring core-file-name)) + (error 'simple-file-error + :format-control "Directory ~S does not exist" + :format-arguments (list (directory-namestring core-file-name)))) + #+mp (mp::shutdown-multi-processing) (when (fboundp 'eval:flush-interpreted-function-cache) (eval:flush-interpreted-function-cache)) -- GitLab