#QUALITY by exept
authorClaus Gittinger <cg@exept.de>
Fri, 13 Sep 2019 09:55:07 +0200
changeset 19173 71aa982cb0cf
parent 19172 f2819db5cb15
child 19174 36d016014f6a
#QUALITY by exept class: AbstractFileBrowser changed: #generatePatchInstallerForSelectedFiles ensure file is closed.
AbstractFileBrowser.st
--- a/AbstractFileBrowser.st	Fri Sep 13 09:27:15 2019 +0200
+++ b/AbstractFileBrowser.st	Fri Sep 13 09:55:07 2019 +0200
@@ -1,5 +1,3 @@
-"{ Encoding: utf8 }"
-
 "
  COPYRIGHT (c) 2002 by eXept Software AG
               All Rights Reserved
@@ -2977,7 +2975,7 @@
                                     "/ are perfect here, but usually not available in the font
                                     "/ and we have currently no way of knowing if they are...
                                     "/ (could let the font draw into a bitmap and check if there is something...)
-                                    "/ For now, write a dot.·
+                                    "/ For now, write a dot.·
                                     "/ charPrinted := (Character value:(byte + 16r2400))
                                 ].
                             ].
@@ -8089,8 +8087,11 @@
             |inStream signatureFilename|
 
             inStream := fn asFilename readStream.
-            zipArchive addFile: (targetDir construct:fn asFilename baseName) name fromStream:inStream.
-            inStream close.
+            [
+                zipArchive addFile: (targetDir construct:fn asFilename baseName) name fromStream:inStream.
+            ] ensure:[
+                inStream close.
+            ].
         ].
 
         zipArchive close.
@@ -8954,7 +8955,7 @@
             ] ifFalse:[sig == HaltInterrupt ifTrue:[ |sender|
                 label := msg := 'Breakpoint/Halt in fileIn'.
                 sender := ex suspendedContext.
-                msg := msg , ('\\in %1 » %2' bindWith:(sender receiver class name) with:(sender sender selector))
+                msg := msg , ('\\in %1 » %2' bindWith:(sender receiver class name) with:(sender sender selector))
             ] ifFalse:[
                 label := 'Error in fileIn'.
                 msg := 'error in fileIn: %1'