[changeset] Re: bug in gunzip / strange line numbers in error message / keyboard weirdness
David Bateman
David.Bateman at motorola.com
Thu Nov 27 03:53:43 CST 2008
Thorsten Meyer wrote:
> Søren Hauberg wrote:
>
>>> gzfile =
>>>
>>> {
>>> [1,1] = /tmp/oct-rZOZFQ/oct-OLjAWz.gz
>>> }
>>>
>>> octave:7> gunzip(gzfile)
>>> error: `ext' undefined near line 145 column 30
>>> error: evaluating argument list element number 1
>>> error: evaluating argument list element number 1
>>> error: called from:
>>> error: /home/thorsten/hg/octave/scripts/miscellaneous/unpack.m at line 145, column 12
>>> error: /home/thorsten/hg/octave/scripts/miscellaneous/gunzip.m at line 47, column 5
>>>
>> I quick look at 'unpack.m' brings the following to my attention:
>>
>> if (ischar (file))
>> if (isdir (file))
>> if (isempty (filetype))
>> error ("unpack: filetype must be given for a directory");
>> elseif (! any (strcmpi (filetype, "gunzip")))
>> error ("unpack: filetype must be gunzip for a directory");
>> endif
>> else
>> [pathstr, name, ext] = fileparts (file);
>>
>>
>> So, if 'file' is a directory, we don't really do anything with it. I
>> some cases we raise errors, but sometimes we just do nothing. I'm
>> guessing this is the source of the problem.
>>
>
>
> Thanks for the hint. I found the bug a bit further down the same if statement: unpack handles
> cell arrays of strings by recursively calling unpack for the individual strings. After that it does
> not return but enters the part of the function which is meant for strings only.
>
> Enclosed is a patch that solves this problem.
>
> regards
>
> Thorsten
>
>
Applied
Thanks
D.
--
David Bateman David.Bateman at motorola.com
Motorola Labs - Paris +33 1 69 35 48 04 (Ph)
Parc Les Algorithmes, Commune de St Aubin +33 6 72 01 06 33 (Mob)
91193 Gif-Sur-Yvette FRANCE +33 1 69 35 77 01 (Fax)
The information contained in this communication has been classified as:
[x] General Business Information
[ ] Motorola Internal Use Only
[ ] Motorola Confidential Proprietary
More information about the Bug-octave
mailing list