Fixed DownloadFile when file already exists

This commit is contained in:
Taloth Saldono
2019-08-31 21:35:01 +02:00
committed by ta264
parent 3c335d498e
commit 5ef55d2180
2 changed files with 8 additions and 3 deletions
+6 -1
View File
@@ -258,6 +258,11 @@ namespace NzbDrone.Common.Http
}
stopWatch.Stop();
if (File.Exists(fileName))
{
File.Delete(fileName);
}
File.Move(fileNamePart, fileName);
_logger.Debug("Downloading Completed. took {0:0}s", stopWatch.Elapsed.Seconds);
}
@@ -266,7 +271,7 @@ namespace NzbDrone.Common.Http
if (File.Exists(fileNamePart))
{
File.Delete(fileNamePart);
}
}
}
}