Skip to content

Commit d5a6d68

Browse files
committed
Create destination directory before writing archive
1 parent d1e8159 commit d5a6d68

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Sources/PackageRegistry/RegistryManager.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,11 +247,11 @@ public final class RegistryManager {
247247
)
248248
}
249249

250+
try fileSystem.createDirectory(destinationPath, recursive: true)
251+
250252
let archivePath = destinationPath.withExtension("zip")
251253
try fileSystem.writeFileContents(archivePath, bytes: contents)
252254

253-
try fileSystem.createDirectory(destinationPath, recursive: true)
254-
255255
let archiver = Self.archiverFactory(fileSystem)
256256
// TODO: Bail if archive contains relative paths or overlapping files
257257
archiver.extract(from: archivePath, to: destinationPath) { result in

0 commit comments

Comments
 (0)