Mercurial > octave
changeset 29636:9c76a6aefb42 stable
Mark system functions correctly if OCTAVE_HOME is non-canonical (bug #60554).
* libinterp/octave-value/ov-usr-fcn.cc (mark_as_system_fcn_file): Canonicalize
function file directory before comparing strings.
author | Markus Mützel <markus.muetzel@gmx.de> |
---|---|
date | Sat, 08 May 2021 17:43:50 +0200 |
parents | 07dc3ad56d74 |
children | f4a57a41f1e7 161daebce243 |
files | libinterp/octave-value/ov-usr-fcn.cc |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/libinterp/octave-value/ov-usr-fcn.cc Thu May 06 00:31:57 2021 -0500 +++ b/libinterp/octave-value/ov-usr-fcn.cc Sat May 08 17:43:50 2021 +0200 @@ -30,6 +30,7 @@ #include <sstream> #include "file-info.h" +#include "file-ops.h" #include "file-stat.h" #include "str-vec.h" @@ -359,7 +360,9 @@ std::string ff_name = octave::fcn_file_in_path (file_name); - std::string fcn_file_dir = octave::config::fcn_file_dir (); + static const std::string fcn_file_dir + = octave::sys::canonicalize_file_name + (octave::config::fcn_file_dir ()); if (fcn_file_dir == ff_name.substr (0, fcn_file_dir.length ())) system_fcn_file = true; }