Skip to content

Commit 0ce3142

Browse files
committed
Close the archive before deleting it in MCGitBasedNetworkRepository class>>projectDirectoryFrom:version:
Fixes #484
1 parent 06a72ba commit 0ce3142

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

repository/Metacello-GitBasedRepository.package/MCGitBasedNetworkRepository.class/class/projectDirectoryFrom.version..st

+6-5
Original file line numberDiff line numberDiff line change
@@ -22,21 +22,22 @@ projectDirectoryFrom: projectPath version: versionString
2222
url := self
2323
projectZipUrlFor: projectPath
2424
versionString: versionString.
25-
pid := MetacelloPlatform current processPID.
26-
zipFileName := MetacelloPlatform current
25+
pid := mcPlatform processPID.
26+
zipFileName := mcPlatform
2727
tempFileFor:
2828
self basicDescription , '-' , pid , '-'
2929
, (downloadCacheKey select: [ :c | c isAlphaNumeric ])
3030
suffix: '.zip'.
31-
archive := MetacelloPlatform current
31+
archive := mcPlatform
3232
downloadZipArchive: url
3333
to: zipFileName.
3434
directory := mcPlatform
3535
directoryFromPath: (cachePath := archive members first fileName)
3636
relativeTo: theCacheDirectory.
37+
archive close.
3738
directory exists
38-
ifTrue: [ MetacelloPlatform current deleteFileNamed: zipFileName ]
39-
ifFalse: [ MetacelloPlatform current
39+
ifTrue: [ mcPlatform deleteFileNamed: zipFileName ]
40+
ifFalse: [ mcPlatform
4041
extractRepositoryFrom: zipFileName
4142
to: theCacheDirectory fullName ].
4243
self downloadCache at: downloadCacheKey put: cachePath.

0 commit comments

Comments
 (0)