# HG changeset patch # User John W. Eaton # Date 1401916563 14400 # Node ID ebf6a1e5ff59cebc600104ea6203ce7f18a5c3ba # Parent 307a67b0425383ba94eb19b5250b69a37f176920 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. diff -r 307a67b04253 -r ebf6a1e5ff59 libinterp/corefcn/load-path.cc --- a/libinterp/corefcn/load-path.cc Wed Jun 04 08:29:01 2014 -0700 +++ b/libinterp/corefcn/load-path.cc Wed Jun 04 17:16:03 2014 -0400 @@ -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 ())