pull/1106/merge
Giuseppe Trematerra 2025-04-02 18:22:31 +02:00 committed by GitHub
commit 55b4ac7b76
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 6 deletions

View File

@ -315,18 +315,14 @@ namespace WinSW
{ {
string dst = this.BaseLogFileName + "." + (j - 1) + ext; string dst = this.BaseLogFileName + "." + (j - 1) + ext;
string src = this.BaseLogFileName + "." + (j - 2) + ext; string src = this.BaseLogFileName + "." + (j - 2) + ext;
if (File.Exists(dst))
{
File.Delete(dst);
}
if (File.Exists(src)) if (File.Exists(src))
{ {
File.Move(src, dst); File.Move(src, dst, true);
} }
} }
File.Move(this.BaseLogFileName + ext, this.BaseLogFileName + ".0" + ext); File.Move(this.BaseLogFileName + ext, this.BaseLogFileName + ".0" + ext, true);
} }
catch (IOException e) catch (IOException e)
{ {