changeset 18841: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 307a67b04253
children 7c6ee4bd7719
files libinterp/corefcn/load-path.cc
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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 ())