Mercurial > hg > octave-avbm
changeset 11606:a16658ac8eb9 release-3-0-x
[3-0-0-branch @ 2008-01-07 18:54:22 by jwe]
author | jwe |
---|---|
date | Mon, 07 Jan 2008 18:54:22 +0000 |
parents | fd4eb4f95bb4 |
children | 5426a55a0cac |
files | scripts/ChangeLog scripts/miscellaneous/copyfile.m scripts/miscellaneous/movefile.m |
diffstat | 3 files changed, 13 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,8 @@ +2008-01-07 John W. Eaton <jwe@octave.org> + + * miscellaneous/copyfile.m, miscellaneous/movefile.m: + Error if glob call fails to match any files. + 2008-01-04 Thomas Treichl <Thomas.Treichl@gmx.net> * strings/strtrim.m: Doc fix.
--- a/scripts/miscellaneous/copyfile.m +++ b/scripts/miscellaneous/copyfile.m @@ -1,4 +1,4 @@ -## Copyright (C) 2005, 2006, 2007 John W. Eaton +## Copyright (C) 2005, 2006, 2007, 2008 John W. Eaton ## ## This file is part of Octave. ## @@ -76,6 +76,9 @@ ## Protect the file name(s). f1 = glob (f1); + if (isempty (f1)) + error ("copyfile: no files to move"); + endif p1 = sprintf ("\"%s\" ", f1{:}); p2 = tilde_expand (f2);
--- a/scripts/miscellaneous/movefile.m +++ b/scripts/miscellaneous/movefile.m @@ -1,4 +1,4 @@ -## Copyright (C) 2005, 2006, 2007 John W. Eaton +## Copyright (C) 2005, 2006, 2007, 2008 John W. Eaton ## ## This file is part of Octave. ## @@ -75,6 +75,9 @@ ## Protect the file name(s). f1 = glob (f1); + if (isempty (f1)) + error ("movefile: no files to move"); + endif p1 = sprintf ("\"%s\" ", f1{:}); p2 = tilde_expand (f2);