#OTHER by cg
authorClaus Gittinger <cg@exept.de>
Mon, 30 May 2016 16:34:10 +0200
changeset 3852 9f672a905f2d
parent 3850 5c705a67a0a1
child 3853 a7a4481d6851
child 3854 746533c3d2ae
#OTHER by cg class: ZipArchive changed: #readingFrom: do not close the filestream, if the passed-in stream is the current stream.
ZipArchive.st
--- a/ZipArchive.st	Thu May 19 19:33:38 2016 +0200
+++ b/ZipArchive.st	Mon May 30 16:34:10 2016 +0200
@@ -3339,7 +3339,9 @@
     "initialize the archive to read from aPositionableStream"
 
     file notNil ifTrue: [
-        self closeFile.
+        file ~~ aPositionableStream ifTrue: [
+            self closeFile.
+        ].
     ].
 
     mode := #read.
@@ -3991,7 +3993,6 @@
     ^ false.
 ! !
 
-
 !ZipArchive methodsFor:'reading'!
 
 extract:fileName
@@ -4101,7 +4102,6 @@
     "Created: / 21-11-2010 / 11:51:41 / cg"
 ! !
 
-
 !ZipArchive methodsFor:'reading - stream'!
 
 extract:fileName intoStream: aWriteStream