# HG changeset patch # User Rik # Date 1395935531 25200 # Node ID 70d9db29db6f61b8df5dcfe4faa09a32b8095e50 # Parent 56f3c564baaf711749385b1081505da4dfa29ea5 hgload.m: Correctly find filenames with .ofig extension. * hgload.m: Use file_in_loadpath() rather than exist() to check for presence of file. diff -r 56f3c564baaf -r 70d9db29db6f scripts/plot/util/hgload.m --- a/scripts/plot/util/hgload.m Sun Mar 23 20:37:28 2014 +0100 +++ b/scripts/plot/util/hgload.m Thu Mar 27 08:52:11 2014 -0700 @@ -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