changeset 7355:4e291a77212a

[project @ 2008-01-09 20:27:59 by jwe]
author jwe
date Wed, 09 Jan 2008 20:27:59 +0000
parents 60c1f62b07a5
children 164e98cdee8b
files scripts/ChangeLog scripts/plot/drawnow.m
diffstat 2 files changed, 9 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/ChangeLog	Wed Jan 09 17:23:32 2008 +0000
+++ b/scripts/ChangeLog	Wed Jan 09 20:27:59 2008 +0000
@@ -1,3 +1,8 @@
+2008-01-09  John W. Eaton  <jwe@octave.org>
+
+	* plot/drawnow.m: Fail if filename includes a directory part that
+	does not exist.
+
 2008-01-07  John W. Eaton  <jwe@octave.org>
 
 	* miscellaneous/copyfile.m, miscellaneous/movefile.m:
--- a/scripts/plot/drawnow.m	Wed Jan 09 17:23:32 2008 +0000
+++ b/scripts/plot/drawnow.m	Wed Jan 09 20:27:59 2008 +0000
@@ -43,6 +43,10 @@
     endif
 
     if (nargin >= 2 && nargin <= 4)
+      [dnm, fnm, ext] = fileparts (file);
+      if (! (isempty (dnm) || isdir (dnm)))
+	error ("drawnow: nonexistent directory `%s'", dnm);
+      endif
       h = get (0, "currentfigure");
       if (h)
 	f = get (h);