Mercurial > octave
changeset 20755:46b15c018fa5
unpack.m: Fix handling of gzip archives expanded into /tmp (bug #40274).
* unpack.m: Place files downloaded through URL into the /tmp directory, but
preserve the base name and extension.
author | Rik <rik@octave.org> |
---|---|
date | Wed, 25 Nov 2015 11:32:28 -0800 |
parents | e6ccc8ae9e41 |
children | 200ae1d650b7 |
files | scripts/miscellaneous/unpack.m |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/miscellaneous/unpack.m Wed Nov 25 19:14:15 2015 +0100 +++ b/scripts/miscellaneous/unpack.m Wed Nov 25 11:32:28 2015 -0800 @@ -138,7 +138,7 @@ if (! isempty (strfind (file, "://"))) ## FIXME: The above code is not a perfect test for a URL urlfile = file; - tmpfile = [tempname ext]; + tmpfile = fullfile (tempdir (), [name ext]); [file, success, msg] = urlwrite (urlfile, tmpfile); if (! success) error ('unpack: could not fetch "%s": %s', urlfile, msg);