diff --git a/libinterp/corefcn/fcn-info.cc b/libinterp/corefcn/fcn-info.cc --- a/libinterp/corefcn/fcn-info.cc +++ b/libinterp/corefcn/fcn-info.cc @@ -86,7 +86,7 @@ namespace octave tmpfcn->mark_as_private_function (class_name); - private_functions[octave::sys::canonicalize_file_name (dir_name)] = ov_fcn; + private_functions[octave::sys::env::make_absolute (dir_name)] = ov_fcn; return ov_fcn; } diff --git a/libinterp/corefcn/load-path.cc b/libinterp/corefcn/load-path.cc --- a/libinterp/corefcn/load-path.cc +++ b/libinterp/corefcn/load-path.cc @@ -1565,7 +1565,7 @@ namespace octave remove_fcn_map (dir, fcn_files); - remove_private_fcn_map (sys::canonicalize_file_name (dir)); + remove_private_fcn_map (sys::env::make_absolute (dir)); remove_method_map (dir); } @@ -1696,9 +1696,9 @@ namespace octave std::string retval; // update (); - std::string canon_dir = sys::canonicalize_file_name (dir); - - const_private_fcn_map_iterator q = private_fcn_map.find (canon_dir); + std::string abs_dir = sys::env::make_absolute (dir); + + const_private_fcn_map_iterator q = private_fcn_map.find (abs_dir); if (q != private_fcn_map.end ()) { @@ -1709,7 +1709,7 @@ namespace octave if (p != fcn_file_map.end ()) { std::string fname - = sys::file_ops::concat (sys::file_ops::concat (canon_dir, "private"), fcn); + = sys::file_ops::concat (sys::file_ops::concat (abs_dir, "private"), fcn); if (check_file_type (fname, type, p->second, fcn, "load_path::find_private_fcn")) @@ -1717,7 +1717,7 @@ namespace octave } } else - retval = find_private_fcn_file (canon_dir, fcn, type); + retval = find_private_fcn_file (abs_dir, fcn, type); return retval; } @@ -1935,7 +1935,7 @@ namespace octave dir_info::fcn_file_map_type private_file_map = di.private_file_map; if (! private_file_map.empty ()) - private_fcn_map[sys::canonicalize_file_name (di.dir_name)] + private_fcn_map[sys::env::make_absolute (di.dir_name)] = private_file_map; } @@ -1999,7 +1999,7 @@ namespace octave dir_info::fcn_file_map_type private_file_map = ci.private_file_map; if (! private_file_map.empty ()) - private_fcn_map[sys::canonicalize_file_name (full_dir_name)] + private_fcn_map[sys::env::make_absolute (full_dir_name)] = private_file_map; } } @@ -2139,7 +2139,7 @@ namespace octave void load_path::package_info::remove_private_fcn_map (const std::string& dir) { - auto p = private_fcn_map.find (sys::canonicalize_file_name (dir)); + auto p = private_fcn_map.find (sys::env::make_absolute (dir)); if (p != private_fcn_map.end ()) private_fcn_map.erase (p); diff --git a/libinterp/corefcn/symscope.cc b/libinterp/corefcn/symscope.cc --- a/libinterp/corefcn/symscope.cc +++ b/libinterp/corefcn/symscope.cc @@ -30,6 +30,7 @@ #include #include "file-ops.h" +#include "oct-env.h" #include "fcn-info.h" #include "interpreter-private.h" @@ -174,7 +175,7 @@ namespace octave void symbol_scope_rep::cache_dir_name (const std::string& name) { - m_dir_name = octave::sys::canonicalize_file_name (name); + m_dir_name = octave::sys::env::make_absolute (name); } bool