--- a/Archiver.st Thu Dec 07 17:54:01 2006 +0100
+++ b/Archiver.st Fri Dec 08 10:46:25 2006 +0100
@@ -479,7 +479,7 @@
!Archiver::MultiFileArchive methodsFor:'actions'!
addFilesToArchive:colOfFiles
- |cmd tempDir archivFile archivInTemp fileSize |
+ |cmd tempDir archivFile archivInTemp fileSize backupFile|
archivFile := self fileName.
@@ -493,9 +493,13 @@
"/ keep a save copy
- (archivFile withSuffix: 'sav') exists
- ifTrue: [(archivFile withSuffix: 'sav') remove].
+ backupFile := archivFile withSuffix: 'sav'.
+ (backupFile exists) ifTrue:[
+ backupFile recursiveRemove. " works for a file as well as for a directory "
+ ].
+
archivFile renameTo:(archivFile withSuffix:'sav').
+
[
"/ copy files to be added to tempDir
colOfFiles do:[:file | | destName |
@@ -1287,7 +1291,7 @@
!Archiver class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic2/Archiver.st,v 1.29 2006-11-27 13:56:36 boris Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic2/Archiver.st,v 1.30 2006-12-08 09:46:25 boris Exp $'
! !
Archiver initialize!