Andreas Raab uploaded a new version of Compression to project The Trunk:
http://source.squeak.org/trunk/Compression-ar.26.mcz==================== Summary ====================
Name: Compression-ar.26
Author: ar
Time: 16 September 2010, 8:17:17.914 pm
UUID: e2cb4788-3034-3540-8dda-4db6b602ca6c
Ancestors: Compression-cmm.25
Close zip file before trying to delete directory in test. Windows will not allow deletion of directories with open files in it.
=============== Diff against Compression-cmm.25 ===============
Item was changed:
----- Method: ZipArchiveTests>>testCreateWithRelativeNames (in category 'tests') -----
testCreateWithRelativeNames
"Test creating a zip with a relative tree of files, so that the tree will
be created whereever the ."
| subdir zip |
subdir := FileDirectory default / '_test-zip-dir'.
self deny: subdir exists.
subdir assureExistence.
[ subdir
fileNamed: '_test-zip-file'
do: [ : stream | stream nextPutAll: 'file contents' ].
zip := ZipArchive new.
zip
addDirectory: subdir fullName
as: subdir localName.
zip
addFile: (subdir fullNameFor: '_test-zip-file')
as: '_test-zip-dir' , FileDirectory slash , '_test-zip-file'.
zip writeToFileNamed: (FileDirectory default fullNameFor: '_test.zip') ]
+ ensure:[
+ zip close.
+ subdir ifNotNil: [ subdir recursiveDelete ].
+ FileDirectory default deleteFileNamed: '_test.zip'.
+ ]!
- ensure:
- [ subdir ifNotNil: [ subdir recursiveDelete ].
- FileDirectory default deleteFileNamed: '_test.zip' ]!