Skip to content
This repository was archived by the owner on Mar 7, 2026. It is now read-only.

Commit 1b47231

Browse files
authored
More bug fixes
1 parent 8c9da3b commit 1b47231

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

Sources/prostore/prostore.swift

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,13 @@ struct ContentView: View {
173173
for case let file as URL in enumerator {
174174
let relative = file.path.replacingOccurrences(of: tmp.path + "/", with: "")
175175
if file.hasDirectoryPath {
176-
try writeArchive.addEntry(with: relative + "/", type: .directory, uncompressedSize: 0, compressionMethod: .deflate) // directories recorded
176+
try writeArchive.addEntry(
177+
with: relative + "/",
178+
type: .directory,
179+
uncompressedSize: 0,
180+
compressionMethod: .deflate,
181+
provider: { _, _ in Data() }
182+
)
177183
} else {
178184
let data = try Data(contentsOf: file)
179185
try writeArchive.addEntry(with: relative, type: .file, uncompressedSize: UInt32(data.count), compressionMethod: .deflate, provider: { (position, size) -> Data in

0 commit comments

Comments
 (0)