[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #45331] unpack hangs when output file exists
From: |
Rik |
Subject: |
[Octave-bug-tracker] [bug #45331] unpack hangs when output file exists |
Date: |
Sat, 04 Jul 2015 12:38:51 +0000 |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:38.0) Gecko/20100101 Firefox/38.0 |
Follow-up Comment #14, bug #45331 (project octave):
The second patch won't unpack files to the current directory if called like
so
unpack ("../foo.gz", [], "gz")
Also, with gunzip ('../foo.gz') I get the following error:
error: octave_base_value::convert_to_str_internal (): wrong type argument
'struct'
error: called from
unpack at line 152 column 9
gunzip at line 45 column 5
error: tilde_expand: expecting argument to be char or cellstr object
error: called from
unpack at line 152 column 9
gunzip at line 45 column 5
This is because without the default assignment in the prototype of the
function, dir is no longer a variable if gunzip is called with a single
argument. Instead, when you call unpack you are calling it with the output of
the function dir() which is a structure.
function filelist = gunzip (gzfile, dir)
if (nargin < 1 || nargin > 2)
print_usage ();
endif
if (nargout > 0)
filelist = unpack (gzfile, dir, "gunzip");
else
unpack (gzfile, dir, "gunzip");
endif
endfunction
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?45331>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/