Mercurial > octave
diff libinterp/corefcn/interpreter.cc @ 32080:e9fdfebc6db0
Avoid using file_stat in libinterp/corefcn (bug #59711).
* dirfnc.cc (F__mkdir__), file-io.cc (do_stream_open), graphics.cc (Fdrawnow),
interpreter.cc (interpreter::execute_startup_files),
load-path.cc (load_path::find_file, load_path::find_dir,
load_path::find_matching_dirs, load_path::find_first_of,
load_path::find_all_first_of, load_path::execute_pkg_add_or_del,
load_path::add, load_path::find_private_file,
load_path::dir_info::get_file_list, load_path::dir_info::get_method_file_map,
genpath), load-save.cc (find_file_to_load),
ls-mat5.cc (read_mat5_binary_element), urlwrite (Furlwrite),
utils.cc (find_data_file_in_load_path, fcn_file_in_path),
__ftp__.cc (F__ftp_mput__), __magick_read__.cc (F__magick_write__): Use
functions "dir_exists" or "file_exists" instead of "file_stat".
author | Markus Mützel <markus.muetzel@gmx.de> |
---|---|
date | Sat, 06 May 2023 13:08:38 +0200 |
parents | 0db880f38b1f |
children | 3c608abd55f5 |
line wrap: on
line diff
--- a/libinterp/corefcn/interpreter.cc Sat May 06 12:57:46 2023 +0200 +++ b/libinterp/corefcn/interpreter.cc Sat May 06 13:08:38 2023 +0200 @@ -43,6 +43,7 @@ #include "fpucw-wrappers.h" #include "lo-blas-proto.h" #include "lo-error.h" +#include "lo-sysdep.h" #include "oct-env.h" #include "quit.h" #include "str-vec.h" @@ -1193,9 +1194,7 @@ // Names alone are not enough. - sys::file_stat fs_home_rc (home_rc); - - if (fs_home_rc) + if (sys::file_exists (home_rc)) { // We want to check for curr_dir after executing home_rc // because doing that may change the working directory.