#REFACTORING by stefan
authorStefan Vogel <sv@exept.de>
Thu, 11 Apr 2019 18:36:59 +0200
changeset 24061 ed9f25954e20
parent 24060 8b906a9efccc
child 24062 d95c06ef5614
#REFACTORING by stefan class: ObjectMemory class changed: #initChangeFilename #snapShotOn:setImageName: use \"asFilename pathName\" instead of \"asFilename asAbsoluteFilename pathName\" ist is equivalent!
ObjectMemory.st
--- a/ObjectMemory.st	Thu Apr 11 18:31:06 2019 +0200
+++ b/ObjectMemory.st	Thu Apr 11 18:36:59 2019 +0200
@@ -5731,12 +5731,14 @@
     "/ make the changeFilePath an absolute one,
     "/ in case some stupid windows fileDialog changes the current directory...
     self
-	nameForChanges:(self directoryForImageAndChangeFile / ObjectMemory nameForChangesLocal)
-			    asAbsoluteFilename pathName
+        nameForChanges:(self directoryForImageAndChangeFile / ObjectMemory nameForChangesLocal)
+                            pathName
 
     "
      self initChangeFilename
     "
+
+    "Modified: / 11-04-2019 / 18:05:59 / Stefan Vogel"
 !
 
 nameForChanges
@@ -5946,7 +5948,7 @@
      ST-80 compatibility; send #preSnapshot to all classes
     "
     Smalltalk allClassesDo:[:aClass |
-	aClass preSnapshot
+        aClass preSnapshot
     ].
 
     "
@@ -5956,57 +5958,57 @@
     "
     snapshotFilename := aFileName asFilename.
     snapshotFilename isAbsolute ifFalse:[
-	snapshotFilename := self directoryForImageAndChangeFile
-			    / snapshotFilename name.
+        snapshotFilename := self directoryForImageAndChangeFile
+                            / snapshotFilename name.
     ].
 
     tempFilename := (FileStream newTemporaryIn:snapshotFilename directory)
-			close;
-			fileName.
+                        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 has 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 has stx as interpreter and can be executed"
+            tempFilename makeExecutable.
+        ].
+        tempFilename renameTo:snapshotFilename.
+
+        Class addChangeRecordForSnapshot:aFileName.
+
+        setImageName ifTrue:[
+            oldChangeFile := self nameForChanges.
+            ImageName := snapshotFilename pathName.
+            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"
     ].
 
     Error catch:[
-	"be immune against errors when Stderr has been closed"
-	Logger
-	    info:'Snapshot %1 saved %2 in %3."'
-	    with:snapshotFilename baseName allBold
-	    with:Timestamp now
-	    with:snapshotFilename asAbsoluteFilename directoryName.
+        "be immune against errors when Stderr has been closed"
+        Logger
+            info:'Snapshot %1 saved %2 in %3."'
+            with:snapshotFilename baseName allBold
+            with:Timestamp now
+            with:snapshotFilename directory pathName.
     ].
 
     ^ ok
@@ -6019,6 +6021,7 @@
     "Modified: / 04-08-2006 / 18:14:45 / cg"
     "Modified: / 09-02-2018 / 19:14:08 / stefan"
     "Modified (format): / 11-02-2018 / 20:07:55 / stefan"
+    "Modified: / 11-04-2019 / 18:17:19 / Stefan Vogel"
 !
 
 suffixForSnapshot