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

Commit d9de675

Browse files
authored
Fixes and improvements
1 parent 1b47231 commit d9de675

1 file changed

Lines changed: 17 additions & 3 deletions

File tree

Sources/prostore/prostore.swift

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -177,14 +177,28 @@ struct ContentView: View {
177177
with: relative + "/",
178178
type: .directory,
179179
uncompressedSize: 0,
180+
modificationDate: Date(),
181+
permissions: nil,
180182
compressionMethod: .deflate,
183+
bufferSize: 16 * 1024,
184+
progress: nil,
181185
provider: { _, _ in Data() }
182186
)
183187
} else {
184188
let data = try Data(contentsOf: file)
185-
try writeArchive.addEntry(with: relative, type: .file, uncompressedSize: UInt32(data.count), compressionMethod: .deflate, provider: { (position, size) -> Data in
186-
return data.subdata(in: Int(position)..<Int(position + size))
187-
})
189+
try writeArchive.addEntry(
190+
with: relative,
191+
type: .file,
192+
uncompressedSize: UInt32(data.count),
193+
modificationDate: Date(),
194+
permissions: nil,
195+
compressionMethod: .deflate,
196+
bufferSize: 16 * 1024,
197+
progress: nil,
198+
provider: { (position, size) in
199+
data.subdata(in: Int(position)..<Int(position + size))
200+
}
201+
)
188202
}
189203
}
190204

0 commit comments

Comments
 (0)