diff --git a/ConversationsClassic/AppCore/Files/DownloadManager.swift b/ConversationsClassic/AppCore/Files/DownloadManager.swift index 83e5d39..f19d956 100644 --- a/ConversationsClassic/AppCore/Files/DownloadManager.swift +++ b/ConversationsClassic/AppCore/Files/DownloadManager.swift @@ -27,6 +27,9 @@ final class DownloadManager { if let tempLocalUrl = tempLocalUrl, error == nil { do { + if FileManager.default.fileExists(atPath: localUrl.path) { + try FileManager.default.removeItem(at: localUrl) + } try FileManager.default.copyItem(at: tempLocalUrl, to: localUrl) completion(nil) } catch let writeError {