mirror of
https://github.com/Sonarr/Sonarr.git
synced 2025-01-04 06:38:28 +02:00
Fixed DownloadFile when file already exists
This commit is contained in:
parent
b764c44318
commit
9ed0f9eee8
@ -249,6 +249,10 @@ public void DownloadFile(string url, string fileName)
|
||||
var response = Get(request);
|
||||
}
|
||||
stopWatch.Stop();
|
||||
if (File.Exists(fileName))
|
||||
{
|
||||
File.Delete(fileName);
|
||||
}
|
||||
File.Move(fileNamePart, fileName);
|
||||
_logger.Debug("Downloading Completed. took {0:0}s", stopWatch.Elapsed.Seconds);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user