Skip to content

Commit 3e5c59c

Browse files
Update NKCommon.swift
1 parent 746792c commit 3e5c59c

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

Sources/NextcloudKit/NKCommon.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,9 @@ public struct NKCommon: Sendable {
146146

147147
defer {
148148
NotificationCenter.default.removeObserver(tokenObserver)
149+
150+
try? writer?.close()
151+
try? reader?.close()
149152
}
150153

151154
outerLoop: repeat {
@@ -229,9 +232,6 @@ public struct NKCommon: Sendable {
229232
}
230233
} while true
231234

232-
writer?.closeFile()
233-
reader?.closeFile()
234-
235235
// Update incremental chunk sizes
236236
for i in 0..<filesChunk.count {
237237
let path = outputDirectory + "/" + filesChunk[i].fileName

0 commit comments

Comments
 (0)