comparison libinterp/corefcn/load-path.cc @ 18926: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
comparison
equal deleted inserted replaced
18925:87324260043d 18926:cc8aaf9c9e33
1298 if (octave_env::absolute_pathname (file) 1298 if (octave_env::absolute_pathname (file)
1299 || octave_env::rooted_relative_pathname (file)) 1299 || octave_env::rooted_relative_pathname (file))
1300 { 1300 {
1301 file_stat fs (file); 1301 file_stat fs (file);
1302 1302
1303 if (fs.exists ()) 1303 return fs.exists () ? file : retval;
1304 return file;
1305 } 1304 }
1306 else 1305 else
1307 { 1306 {
1308 std::string tfile = find_private_file (file); 1307 std::string tfile = find_private_file (file);
1309 1308