class: FileStream
authorStefan Vogel <sv@exept.de>
Thu, 27 Nov 2014 17:50:12 +0100
changeset 17144 5aa46b24fa21
parent 17143 5b1217eaafa7
child 17145 6b7f5e0a0434
class: FileStream changed: #openWithMode:attributes: answer nil when proceeding from an OpenError
FileStream.st
--- a/FileStream.st	Thu Nov 27 17:48:48 2014 +0100
+++ b/FileStream.st	Thu Nov 27 17:50:12 2014 +0100
@@ -1856,6 +1856,10 @@
     handle notNil ifTrue:[^ self errorAlreadyOpen].
 
     handle := self openFile:pathName withMode:openmode attributes:attributeSpec.
+    handle isNil ifTrue:[
+        "this happens, if proceeding from an OpenError raised in #openFile..."
+        ^ nil.
+    ].
     position := 0.
     buffered isNil ifTrue:[
         buffered := true.       "default is buffered"
@@ -2073,11 +2077,11 @@
 !FileStream class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/FileStream.st,v 1.176 2014-11-18 20:17:17 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/FileStream.st,v 1.177 2014-11-27 16:50:12 stefan Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic/FileStream.st,v 1.176 2014-11-18 20:17:17 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/FileStream.st,v 1.177 2014-11-27 16:50:12 stefan Exp $'
 ! !