Mercurial > hg > octave-nkf
changeset 18744:70d9db29db6f
hgload.m: Correctly find filenames with .ofig extension.
* hgload.m: Use file_in_loadpath() rather than exist() to check for presence of
file.
author | Rik <rik@octave.org> |
---|---|
date | Thu, 27 Mar 2014 08:52:11 -0700 |
parents | 56f3c564baaf |
children | 29f00c0d0657 |
files | scripts/plot/util/hgload.m |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/plot/util/hgload.m +++ b/scripts/plot/util/hgload.m @@ -35,12 +35,12 @@ endif ## Check file existence - if (! exist (filename)) + if (isempty (file_in_loadpath (filename))) [~, ~, ext] = fileparts (filename); if (isempty (ext)) filename = [filename ".ofig"]; endif - if (! exist (filename)) + if (isempty (file_in_loadpath (filename))) error ("hgload: unable to locate file %s", filename); endif endif