Mercurial > hg > octave-lyh
changeset 7430:8b7c7998d78f
[project @ 2008-01-30 07:57:35 by jwe]
author | jwe |
---|---|
date | Wed, 30 Jan 2008 07:57:35 +0000 |
parents | 744f522dbabe |
children | 1edef460c5fe |
files | scripts/ChangeLog scripts/miscellaneous/tempdir.m |
diffstat | 2 files changed, 13 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,5 +1,9 @@ 2008-01-30 John W. Eaton <jwe@octave.org> + * miscellaneous/tempdir.m: Append filesep to name for + compatibility. Warn if not a directory or directory does not + exist. + * strings/deblank.m: Improve compatibility. 2008-01-29 John W. Eaton <jwe@octave.org>
--- a/scripts/miscellaneous/tempdir.m +++ b/scripts/miscellaneous/tempdir.m @@ -24,8 +24,16 @@ function dirname = tempdir () dirname = getenv ("TMPDIR"); - if (length (dirname) == 0) + if (isempty (dirname)) dirname = P_tmpdir; endif + if (! strcmp (dirname(end), filesep)) + strcat (dirname, filesep); + endif + + if (! isdir (dirname)) + warning ("tempdir: `%s' does not exist or is not a directory", dirname); + endif + endfunction