Mercurial > octave-nkf
changeset 11136:a51ac4198e1c
oct-parse.yy (load_fcn_from_file): also strip directory when computing function name from filename
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Fri, 22 Oct 2010 04:24:11 -0400 |
parents | 047b0e877a14 |
children | fe016af51396 |
files | src/ChangeLog src/oct-parse.yy |
diffstat | 2 files changed, 9 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog Fri Oct 22 00:29:31 2010 -0400 +++ b/src/ChangeLog Fri Oct 22 04:24:11 2010 -0400 @@ -1,3 +1,8 @@ +2010-10-22 John W. Eaton <jwe@octave.org> + + * oct-parse.yy (load_fcn_from_file): Also strip directory when + computing function name from filename. Bug #31395. + 2010-10-21 Gunnar Farnebäck <gunnar@lysator.liu.se> * mex.cc (mxArray_number::as_octave_value): Convert single
--- a/src/oct-parse.yy Fri Oct 22 00:29:31 2010 -0400 +++ b/src/oct-parse.yy Fri Oct 22 04:24:11 2010 -0400 @@ -3721,6 +3721,10 @@ { nm = octave_env::base_pathname (file); nm = nm.substr (0, nm.find_last_of ('.')); + + size_t pos = nm.find_last_of (file_ops::dir_sep_str ()); + if (pos != std::string::npos) + nm = nm.substr (pos+1pp); } if (autoload)