[squeak-dev] The Trunk: Files-ct.193.mcz
commits at source.squeak.org
commits at source.squeak.org
Fri Apr 1 11:06:54 UTC 2022
Christoph Thiede uploaded a new version of Files to project The Trunk:
http://source.squeak.org/trunk/Files-ct.193.mcz
==================== Summary ====================
Name: Files-ct.193
Author: ct
Time: 1 April 2022, 1:06:39.866996 pm
UUID: a72ca32d-d21e-fb4b-be07-1a26cb991e68
Ancestors: Files-mt.192
Increases robustness against interruptions in StandardFileStream>>#open:forWrite:.
Merge of robust-forceChangesToDisk.1.cs (http://lists.squeakfoundation.org/pipermail/squeak-dev/2022-March/219577.html).
=============== Diff against Files-mt.192 ===============
Item was changed:
----- Method: StandardFileStream>>open:forWrite: (in category 'open/close') -----
open: fileName forWrite: writeMode
"Open the file with the given name. If writeMode is true, allow writing, otherwise open the file in read-only mode."
"Changed to do a GC and retry before failing ar 3/21/98 17:25"
+ | f newFileID |
- | f |
f := fileName asVmPathName.
+
+ fileID := nil.
+ fileID := [StandardFileStream
+ retryWithGC:
+ [newFileID := nil.
+ newFileID := self primOpen: f writable: writeMode]
+ until: [:id | id notNil]
+ forFileNamed: fileName]
+ ifCurtailed:
+ [newFileID ifNotNil: [self primClose: newFileID]].
-
- fileID := StandardFileStream retryWithGC:[self primOpen: f writable: writeMode]
- until:[:id| id notNil]
- forFileNamed: fileName.
fileID ifNil: [^ nil]. "allows sender to detect failure"
name := fileName.
self register.
rwmode := writeMode.
buffer1 := String new: 1.
+ self enableReadBuffering.!
- self enableReadBuffering
- !
More information about the Squeak-dev
mailing list
|