diff libinterp/corefcn/load-path.cc @ 18960:cc8aaf9c9e33

exist: don't search path for absolute or rooted relative file names * load-path.cc (load_path::do_find_file): If file name is absolute or rooted relative simply check for existence of file. * variables.cc: New tests.
author John W. Eaton <jwe@octave.org>
date Wed, 16 Jul 2014 18:38:55 -0400
parents ebf6a1e5ff59
children d902542221c8
line wrap: on
line diff
--- a/libinterp/corefcn/load-path.cc	Tue Jul 15 22:18:35 2014 +0200
+++ b/libinterp/corefcn/load-path.cc	Wed Jul 16 18:38:55 2014 -0400
@@ -1300,8 +1300,7 @@
     {
       file_stat fs (file);
 
-      if (fs.exists ())
-        return file;
+      return fs.exists () ? file : retval;
     }
   else
     {