We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents d548598 + 0762e5d commit 7719291Copy full SHA for 7719291
Sources/TRCache.swift
@@ -291,13 +291,15 @@ extension TRCache {
291
///
292
/// - Parameter task:
293
public func removeTmpFile(_ task: TRDownloadTask) {
294
+ objc_sync_enter(self)
295
ioQueue.async {
296
if task.fileName.isEmpty { return }
297
let path = (self.downloadTmpPath as NSString).appendingPathComponent(task.fileName)
298
if self.fileManager.fileExists(atPath: path) {
299
try? self.fileManager.removeItem(atPath: path)
300
}
301
302
+ objc_sync_exit(self)
303
304
305
0 commit comments