This commit is contained in:
fmodf 2024-07-13 17:02:57 +02:00
parent c5a631d546
commit 36bfdf9dcb

View file

@ -27,6 +27,9 @@ final class DownloadManager {
if let tempLocalUrl = tempLocalUrl, error == nil { if let tempLocalUrl = tempLocalUrl, error == nil {
do { do {
if FileManager.default.fileExists(atPath: localUrl.path) {
try FileManager.default.removeItem(at: localUrl)
}
try FileManager.default.copyItem(at: tempLocalUrl, to: localUrl) try FileManager.default.copyItem(at: tempLocalUrl, to: localUrl)
completion(nil) completion(nil)
} catch let writeError { } catch let writeError {