--- a/ObjectMemory.st Mon Aug 19 23:30:27 2013 +0100
+++ b/ObjectMemory.st Tue Aug 20 00:07:19 2013 +0100
@@ -5287,7 +5287,7 @@
ST-80 compatibility; send #preSnapshot to all classes
"
Smalltalk allClassesDo:[:aClass |
- aClass preSnapshot
+ aClass preSnapshot
].
"
@@ -5296,52 +5296,54 @@
(could be ST/X error or file-system errors etc.)
"
snapshotFilename := aFileName asFilename.
- tempFilename := snapshotFilename withSuffix:'tmp'.
+ tempFilename := (FileStream newTemporaryIn:snapshotFilename directory)
+ close;
+ fileName.
ok := self primSnapShotOn:tempFilename.
ok ifTrue:[
- "keep history of one snapshot file"
- snapshotFilename exists ifTrue:[
- tempFilename symbolicAccessRights:snapshotFilename symbolicAccessRights.
- snapshotFilename renameTo:(snapshotFilename withSuffix:'sav').
- ] ifFalse:[
- "image file hat stx as interpreter and can be executed"
- tempFilename makeExecutable.
- ].
- tempFilename renameTo:snapshotFilename.
-
- Class addChangeRecordForSnapshot:aFileName.
-
- setImageName ifTrue:[
- oldChangeFile := self nameForChanges.
- ImageName := snapshotFilename asAbsoluteFilename asString.
- self refreshChangesFrom:oldChangeFile.
- ].
+ "keep history of one snapshot file"
+ snapshotFilename exists ifTrue:[
+ tempFilename symbolicAccessRights:snapshotFilename symbolicAccessRights.
+ snapshotFilename renameTo:(snapshotFilename withSuffix:'sav').
+ ] ifFalse:[
+ "image file hat stx as interpreter and can be executed"
+ tempFilename makeExecutable.
+ ].
+ tempFilename renameTo:snapshotFilename.
+
+ Class addChangeRecordForSnapshot:aFileName.
+
+ setImageName ifTrue:[
+ oldChangeFile := self nameForChanges.
+ ImageName := snapshotFilename asAbsoluteFilename asString.
+ self refreshChangesFrom:oldChangeFile.
+ ].
] ifFalse:[
- tempFilename remove.
+ tempFilename remove.
].
"
ST-80 compatibility; send #postSnapshot to all classes
"
Smalltalk allClassesDo:[:aClass |
- aClass postSnapshot
+ aClass postSnapshot
].
self changed:#finishedSnapshot. "/ ST-80 compatibility
ok ifFalse:[
- SnapshotError raise.
- "not reached"
+ SnapshotError raise.
+ "not reached"
].
Transcript
- show:'Snapshot ';
- show:snapshotFilename baseName allBold;
- show:' saved ';
- show:Timestamp now;
- show:' in ';
- show:snapshotFilename asAbsoluteFilename directoryName;
- showCR:'.'.
+ show:'Snapshot ';
+ show:snapshotFilename baseName allBold;
+ show:' saved ';
+ show:Timestamp now;
+ show:' in ';
+ show:snapshotFilename asAbsoluteFilename directoryName;
+ showCR:'.'.
^ ok
@@ -5504,7 +5506,7 @@
!ObjectMemory class methodsFor:'documentation'!
version_CVS
- ^ '$Header: /cvs/stx/stx/libbasic/ObjectMemory.st,v 1.270 2013-07-05 11:17:47 stefan Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/ObjectMemory.st,v 1.271 2013-08-16 17:38:47 stefan Exp $'
!
version_SVN