Skip to content

Commit

Permalink
Fix warning about umrecognized files
Browse files Browse the repository at this point in the history
  • Loading branch information
Razzmatazzz committed Aug 21, 2023
1 parent 5b9cc85 commit fb3434d
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions RemnantSaveGuardian/Views/Pages/BackupsPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ public BackupsPage(ViewModels.BackupsViewModel viewModel)
} catch (Exception ex) {
Logger.Error($"Error loading backups page: {ex}");
}

}

private void MenuAnalyze_Click(object sender, System.Windows.RoutedEventArgs e)
Expand Down Expand Up @@ -672,9 +671,13 @@ private void saveFolderUnrecognizedFilesCheck()
var invalidFiles = new List<string>();
foreach (string file in Directory.GetFiles(Properties.Settings.Default.SaveFolder))
{
if (!Regex.Match(file, @"^(profile|save_\d+)\.(sav|bak)$").Success)
var fileName = Path.GetFileName(file);
if (!Regex.Match(fileName, @"^(profile|save_\d+)\.(sav|bak\d?|onl)|steam_autocloud.vdf$").Success)
{
invalidFiles.Add(file);
if (fileName.EndsWith(".sav"))
{
invalidFiles.Add(fileName);
}
}
}
if (invalidFiles.Count > 0)
Expand Down

0 comments on commit fb3434d

Please sign in to comment.