# HG changeset patch # User jwe # Date 1201679855 0 # Node ID 8b7c7998d78fd3bc1d8c39df2492314c79a12a50 # Parent 744f522dbabef12a86d2b0c8e5b2e165c4aaa32f [project @ 2008-01-30 07:57:35 by jwe] diff --git a/scripts/ChangeLog b/scripts/ChangeLog --- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,5 +1,9 @@ 2008-01-30 John W. Eaton + * 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 diff --git a/scripts/miscellaneous/tempdir.m b/scripts/miscellaneous/tempdir.m --- 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