Mercurial > hg > octave-lojdl
changeset 9512:56e850e3b06f
dlmread: perform tilde expansion to filename argument
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Mon, 10 Aug 2009 15:18:41 -0400 |
parents | cc1fd3084cb2 |
children | 9f870f73ab7d |
files | src/ChangeLog src/DLD-FUNCTIONS/dlmread.cc |
diffstat | 2 files changed, 9 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2009-08-10 John W. Eaton <jwe@octave.org> + + * DLD-FUNCTIONS/dlmread.cc (Fdlmread): Perform tilde expansion on + filename argument. + 2009-08-10 Jaroslav Hajek <highegg@gmail.com> * symtab.cc (out_of_date_check): Remove overloads. Add check_relative
--- a/src/DLD-FUNCTIONS/dlmread.cc +++ b/src/DLD-FUNCTIONS/dlmread.cc @@ -30,6 +30,7 @@ #include <cctype> #include <fstream> +#include "file-ops.h" #include "lo-ieee.h" #include "defun-dld.h" @@ -187,7 +188,9 @@ if (error_state) return retval; - std::ifstream file (fname.c_str ()); + std::string tname = file_ops::tilde_expand (fname); + + std::ifstream file (tname.c_str ()); if (!file) { error ("dlmread: unable to open file `%s'", fname.c_str ());