Skip to content

Commit

Permalink
Merge pull request #135 from Razzmatazzz/fix-unrecognized-files-warning
Browse files Browse the repository at this point in the history
Fix warning about umrecognized files
  • Loading branch information
Razzmatazzz authored Aug 21, 2023
2 parents cd5a35c + fb3434d commit 263250f
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 263250f

Please sign in to comment.