wip
This commit is contained in:
parent
c5a631d546
commit
36bfdf9dcb
|
@ -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 {
|
||||||
|
|
Loading…
Reference in a new issue