Mercurial > octave-nkf
changeset 5871:b9fd54407c8d
[project @ 2006-06-30 16:48:39 by jwe]
author | jwe |
---|---|
date | Fri, 30 Jun 2006 16:48:40 +0000 |
parents | a0218194daa6 |
children | 44f24cf66b95 |
files | liboctave/ChangeLog liboctave/dir-ops.cc liboctave/file-stat.cc src/ChangeLog src/load-path.cc |
diffstat | 5 files changed, 19 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/liboctave/ChangeLog Fri Jun 30 15:50:40 2006 +0000 +++ b/liboctave/ChangeLog Fri Jun 30 16:48:40 2006 +0000 @@ -1,5 +1,8 @@ 2006-06-30 John W. Eaton <jwe@octave.org> + * dir-ops.cc (dir_entry::open): Perform tilde expansion here. + * file-stat.cc (stat::update_internal): Ditto. + * data-conv.cc (data_conv::string_to_data_type): Correctly handle leading "*".
--- a/liboctave/dir-ops.cc Fri Jun 30 15:50:40 2006 +0000 +++ b/liboctave/dir-ops.cc Fri Jun 30 16:48:40 2006 +0000 @@ -32,6 +32,7 @@ #include "sysdir.h" #include "dir-ops.h" +#include "file-ops.h" #include "lo-error.h" #include "lo-sysdep.h" #include "str-vec.h" @@ -47,8 +48,10 @@ if (! name.empty ()) { close (); + + std::string fullname = file_ops::tilde_expand (name); - dir = static_cast<void *> (opendir (name.c_str ())); + dir = static_cast<void *> (opendir (fullname.c_str ())); if (dir) fail = false;
--- a/liboctave/file-stat.cc Fri Jun 30 15:50:40 2006 +0000 +++ b/liboctave/file-stat.cc Fri Jun 30 16:48:40 2006 +0000 @@ -35,6 +35,7 @@ #include <unistd.h> #endif +#include "file-ops.h" #include "file-stat.h" #include "statdefs.h" @@ -196,8 +197,10 @@ { initialized = false; fail = false; + + std::string full_file_name = file_ops::tilde_expand (file_name); - const char *cname = file_name.c_str (); + const char *cname = full_file_name.c_str (); struct stat buf;
--- a/src/ChangeLog Fri Jun 30 15:50:40 2006 +0000 +++ b/src/ChangeLog Fri Jun 30 16:48:40 2006 +0000 @@ -1,3 +1,8 @@ +2006-06-30 John W. Eaton <jwe@octave.org> + + * load-path.cc (genpath): Don't perform tilde expansion on name. + (load_path::do_add): Don't warn about moving "." to front of list. + 2006-06-28 John W. Eaton <jwe@octave.org> * load-path.cc (Faddpath): Don't treat "." specially here.
--- a/src/load-path.cc Fri Jun 30 15:50:40 2006 +0000 +++ b/src/load-path.cc Fri Jun 30 16:48:40 2006 +0000 @@ -509,12 +509,7 @@ i = find_dir_info ("."); if (i != dir_info_list.end ()) - { - if (i != dir_info_list.begin () && warn) - warning ("addpath: \".\" is always first in the path"); - - move (i, false); - } + move (i, false); else panic_impossible (); } @@ -1140,9 +1135,7 @@ { std::string retval; - std::string full_dirname = file_ops::tilde_expand (dirname); - - dir_entry dir (full_dirname); + dir_entry dir (dirname); if (dir) { @@ -1172,7 +1165,7 @@ if (! skip_p) { - std::string nm = full_dirname + file_ops::dir_sep_str + elt; + std::string nm = dirname + file_ops::dir_sep_str + elt; file_stat fs (nm);