Mantis Bugtracker
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0001606 [Squeak] System minor always 08-04-05 00:49 03-02-06 09:25
Reporter Russell Penney View Status public  
Assigned To ned
Priority normal Resolution fixed  
Status closed   Product Version
Summary 0001606: [FIX] ZipArchive - Cant read from ReadWriteStreams
Description Fixes a problem I found with ZipArchive not being able to read from a
ReadWriteStream. Removes any dependence on String internally, which seemed
strange as it forces the input stream to binary before reading. FileStream
does something different to ReadWriteStreams.

 

Try:

| buffer |

 

s := StandardFileStream readOnlyFileNamed: 'somefile.zip'.

s binary.

buffer := s contents.

s close.

s := ReadWriteStream with: buffer.

s reset.

ZipArchive new readFrom: s.
Additional Information
Attached Files  ZipArchiveChanges.1.cs.gz [^] (1,346 bytes) 08-04-05 00:49
 ZipArchiveChanges.3.cs.gz [^] (2,982 bytes) 08-04-05 00:52

- Relationships

- Notes
(0002119 - 280 - 320 - 362 - 362 - 362 - 362)
KenCausey
08-04-05 00:51

=?ISO-8859-1?Q?st=E9phane_ducasse?= <ducasse@iam.unibe.ch>:

"thanks for your fix. (If I ask nicely may be this will work) would it
be possible to get one or two unit tests so that we can nicely document
your bug and in the same time create active documentation for squeak."
 
(0002120 - 491 - 618 - 667 - 667 - 667 - 667)
KenCausey
08-04-05 00:51

"Russell Penney" <russell.penney@tincanct.com>:

"Stef,
    Here you go. :)

The change set consists of the fix and the tests. They show the difference
between ReadWriteStream and StandardFileStream. Actually the bug is in the
next:into:startingAt: method in one of those two streams.
StandardFileStream's method only works on Strings while ReadWriteStream can
handle any array.

One of the tests leaves a zip file in your current directory."

(attaching ZipArchiveChanges.3.cs.gz)
 
(0002121 - 184 - 184 - 184 - 184 - 184 - 184)
KenCausey
08-04-05 00:53

I was able to load both changesets (separately) into a 3.8-6665-basic image without errors. The tests included with the second changeset ran succesfully. I did not test this further.
 
(0004057 - 53 - 53 - 53 - 53 - 53 - 53)
MarcusDenker
02-24-06 21:15

not reproducable in 3.9a: added the test, runs green.
 
(0004272 - 89 - 89 - 89 - 89 - 89 - 89)
ned
03-01-06 21:34

This is fixed in 3.8 and 3.9; there were a number of fixes needed due to the m18n effort.
 

- Issue History
Date Modified Username Field Change
08-04-05 00:49 KenCausey New Issue
08-04-05 00:49 KenCausey File Added: ZipArchiveChanges.1.cs.gz
08-04-05 00:50 KenCausey Reporter KenCausey => Russell Penney
08-04-05 00:51 KenCausey Note Added: 0002119
08-04-05 00:51 KenCausey Note Added: 0002120
08-04-05 00:52 KenCausey File Added: ZipArchiveChanges.3.cs.gz
08-04-05 00:53 KenCausey Note Added: 0002121
02-24-06 21:15 MarcusDenker Status new => closed
02-24-06 21:15 MarcusDenker Note Added: 0004057
02-24-06 21:15 MarcusDenker Resolution open => fixed
02-24-06 21:15 MarcusDenker Fixed in Version  => 3.9
03-01-06 21:34 ned Status closed => resolved
03-01-06 21:34 ned Fixed in Version 3.9 => 3.8
03-01-06 21:34 ned Assigned To  => ned
03-01-06 21:34 ned Note Added: 0004272
03-02-06 09:25 MarcusDenker Status resolved => closed


Mantis 1.0.8[^]
Copyright © 2000 - 2007 Mantis Group
62 total queries executed.
42 unique queries executed.
Powered by Mantis Bugtracker