Skip to content

Commit

Permalink
Fix for mapping backup
Browse files Browse the repository at this point in the history
  • Loading branch information
josdemmers committed Oct 16, 2023
1 parent a321139 commit e9a7347
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions D4Companion.Services/SystemPresetManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -201,13 +201,13 @@ private void BackupMappings()
if (File.Exists(fileName))
{
File.Copy(fileName, fileNameBackup);
}

// Remove old backups
string[] filePaths = Directory.GetFiles(path, "Mappings.*", SearchOption.TopDirectoryOnly);
for (int i = filePaths.Length - 6; i >= 0; i--)
{
File.Delete(filePaths[i]);
// Remove old backups
string[] filePaths = Directory.GetFiles(path, "Mappings.*", SearchOption.TopDirectoryOnly);
for (int i = filePaths.Length - 6; i >= 0; i--)
{
File.Delete(filePaths[i]);
}
}
}

Expand Down

0 comments on commit e9a7347

Please sign in to comment.