Skip to content

Commit 2f9c2c7

Browse files
Update NKCommon.swift
1 parent f74c0cd commit 2f9c2c7

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Sources/NextcloudKit/NKCommon.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ public struct NKCommon: Sendable {
9797
completion: @escaping (_ filesChunk: [(fileName: String, size: Int64)], _ error: Error?) -> Void = { _, _ in }) {
9898
// Return existing chunks immediately
9999
if !filesChunk.isEmpty {
100-
numChunks(filesChunk.count - 1)
100+
numChunks(max(0, filesChunk.count - 1))
101101
return completion(filesChunk, nil)
102102
}
103103

0 commit comments

Comments
 (0)