# HG changeset patch # User jwe # Date 1199910453 0 # Node ID c3d1d911dfa821bfb4fcbb187819a1ee29072b3b # Parent e20f4ad90c7e84aaf3f1897800237da369b9b514 [3-0-0-branch @ 2008-01-09 20:27:33 by jwe] diff --git a/scripts/ChangeLog b/scripts/ChangeLog --- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,9 @@ +2008-01-09 John W. Eaton + + * plot/drawnow.m: Fail if filename includes a directory part that + does not exist. + + 2008-01-07 John W. Eaton * miscellaneous/copyfile.m, miscellaneous/movefile.m: diff --git a/scripts/plot/drawnow.m b/scripts/plot/drawnow.m --- a/scripts/plot/drawnow.m +++ b/scripts/plot/drawnow.m @@ -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);