Mercurial > hg > octave-nkf
changeset 6182:880235733789
[project @ 2006-11-20 18:49:45 by jwe]
author | jwe |
---|---|
date | Mon, 20 Nov 2006 18:49:45 +0000 |
parents | ac4821cdb740 |
children | 7a52e59d8136 |
files | liboctave/ChangeLog liboctave/oct-env.cc |
diffstat | 2 files changed, 14 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/liboctave/ChangeLog +++ b/liboctave/ChangeLog @@ -1,3 +1,8 @@ +2006-11-20 John W. Eaton <jwe@octave.org> + + * oct-env.cc (octave_env::do_absolute_pathname): Also return true + for ".", and names beginning with "./" or "../". + 2006-11-14 Luis F. Ortiz <lortiz@interactivesupercomputing.com> * CMatrix.cc, dMatrix.cc: New tests.
--- a/liboctave/oct-env.cc +++ b/liboctave/oct-env.cc @@ -258,6 +258,15 @@ return true; #endif + if (len == 1 && s[0] == '.') + return true; + + if (len > 1 && s[0] == '.' && file_ops::is_dir_sep (s[1])) + return true; + + if (len > 2 && s[0] == '.' && s[1] == '.' && file_ops::is_dir_sep (s[2])) + return true; + return false; }