Mercurial > hg > octave-nkf
diff libinterp/corefcn/load-path.cc @ 18997:ebf6a1e5ff59
load files in private directories from private functions (bug #42500)
* load-path.cc (find_private_file): Don't skip search when current
function is private.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Wed, 04 Jun 2014 17:16:03 -0400 |
parents | adbbacce8aaf |
children | cc8aaf9c9e33 |
line wrap: on
line diff
--- a/libinterp/corefcn/load-path.cc +++ b/libinterp/corefcn/load-path.cc @@ -1267,8 +1267,12 @@ octave_user_function *curr_fcn = symbol_table::get_curr_fcn (); - if (curr_fcn && ! curr_fcn->is_private_function ()) + if (curr_fcn) { + // Even for private functions, dir_name doesn't contain the + // "private" directory component so we append it here in all + // cases. + std::string dir_name = curr_fcn->dir_name (); if (! dir_name.empty ())