Mercurial > hg > octave-nkf
diff scripts/plot/util/hgload.m @ 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 | 70cff922a42d |
children | 348f67886dc4 |
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