Mercurial > octave-nkf
comparison libinterp/corefcn/load-path.cc @ 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 | adbbacce8aaf |
children | cc8aaf9c9e33 |
comparison
equal
deleted
inserted
replaced
18835:307a67b04253 | 18841:ebf6a1e5ff59 |
---|---|
1265 // Look in private directory corresponding to current function (if | 1265 // Look in private directory corresponding to current function (if |
1266 // any). | 1266 // any). |
1267 | 1267 |
1268 octave_user_function *curr_fcn = symbol_table::get_curr_fcn (); | 1268 octave_user_function *curr_fcn = symbol_table::get_curr_fcn (); |
1269 | 1269 |
1270 if (curr_fcn && ! curr_fcn->is_private_function ()) | 1270 if (curr_fcn) |
1271 { | 1271 { |
1272 // Even for private functions, dir_name doesn't contain the | |
1273 // "private" directory component so we append it here in all | |
1274 // cases. | |
1275 | |
1272 std::string dir_name = curr_fcn->dir_name (); | 1276 std::string dir_name = curr_fcn->dir_name (); |
1273 | 1277 |
1274 if (! dir_name.empty ()) | 1278 if (! dir_name.empty ()) |
1275 { | 1279 { |
1276 std::string pfname = dir_name + file_ops::dir_sep_str () | 1280 std::string pfname = dir_name + file_ops::dir_sep_str () |