Mercurial > hg > octave-terminal
changeset 11614:26b667edc07a release-3-0-x
[3-0-0-branch @ 2008-01-15 00:49:27 by jwe]
author | jwe |
---|---|
date | Tue, 15 Jan 2008 00:49:28 +0000 |
parents | 96d25ed408e5 |
children | 4036b9a74886 |
files | src/ChangeLog src/load-path.cc |
diffstat | 2 files changed, 13 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2008-01-14 John W. Eaton <jwe@octave.org> + + * load-path.cc (load_path::do_initialize): Start with sys_path empty. + (maybe_add_path_elts): Omit path_sep_str if path is empty. + 2008-01-10 John W. Eaton <jwe@octave.org> * DLD-FUNCTIONS/fsolve.cc (Ffsolve): Doc fix.
--- a/src/load-path.cc +++ b/src/load-path.cc @@ -346,13 +346,18 @@ std::string tpath = genpath (dir); if (! tpath.empty ()) - path += dir_path::path_sep_str + tpath; + { + if (path.empty ()) + path = tpath; + else + path += dir_path::path_sep_str + tpath; + } } void load_path::do_initialize (bool set_initial_path) { - sys_path = dir_path::path_sep_str; + sys_path = ""; if (set_initial_path) { @@ -376,7 +381,7 @@ if (! tpath.empty ()) xpath += dir_path::path_sep_str + tpath; - if (sys_path != dir_path::path_sep_str) + if (! sys_path.empty ()) xpath += sys_path; do_set (xpath, false);