Mercurial > octave
changeset 29639:161daebce243 stable
Mark compiled system functions correctly if OCTAVE_HOME is non-canonical (bug #60554).
* libinterp/octave-value/ov-dld-fcn.cc (octave_dld_function),
libinterp/octave-value/ov-mex-fcn.cc (octave_mex_function): Canonicalize
compiled function file directory before comparing strings.
author | Markus Mützel <markus.muetzel@gmx.de> |
---|---|
date | Sat, 08 May 2021 19:31:48 +0200 |
parents | 9c76a6aefb42 |
children | 4c613e473f9f 874430de1cc7 |
files | libinterp/octave-value/ov-dld-fcn.cc libinterp/octave-value/ov-mex-fcn.cc |
diffstat | 2 files changed, 8 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/libinterp/octave-value/ov-dld-fcn.cc Sat May 08 17:43:50 2021 +0200 +++ b/libinterp/octave-value/ov-dld-fcn.cc Sat May 08 19:31:48 2021 +0200 @@ -27,6 +27,7 @@ # include "config.h" #endif +#include "file-ops.h" #include "oct-shlib.h" #include "defaults.h" @@ -51,7 +52,8 @@ std::string file_name = fcn_file_name (); - std::string oct_file_dir = octave::config::oct_file_dir (); + static const std::string oct_file_dir + = octave::sys::canonicalize_file_name (octave::config::oct_file_dir ()); system_fcn_file = (! file_name.empty () @@ -67,7 +69,8 @@ std::string file_name = fcn_file_name (); - std::string oct_file_dir = octave::config::oct_file_dir (); + static const std::string oct_file_dir + = octave::sys::canonicalize_file_name (octave::config::oct_file_dir ()); system_fcn_file = (! file_name.empty ()
--- a/libinterp/octave-value/ov-mex-fcn.cc Sat May 08 17:43:50 2021 +0200 +++ b/libinterp/octave-value/ov-mex-fcn.cc Sat May 08 19:31:48 2021 +0200 @@ -27,6 +27,7 @@ # include "config.h" #endif +#include "file-ops.h" #include "oct-shlib.h" #include "defaults.h" @@ -55,7 +56,8 @@ std::string file_name = fcn_file_name (); - std::string oct_file_dir = octave::config::oct_file_dir (); + static const std::string oct_file_dir + = octave::sys::canonicalize_file_name (octave::config::oct_file_dir ()); m_is_system_fcn_file = (! file_name.empty () && oct_file_dir == file_name.substr (0, oct_file_dir.length ()));