Preference Packs: Add revert to backup option

This commit is contained in:
Chris Hennes
2022-02-10 23:07:05 -06:00
parent ff67ebce8a
commit 3ecd0cd0f0
12 changed files with 6733 additions and 6 deletions

View File

@@ -130,8 +130,6 @@ void PreferencePack::applyConfigChanges() const
}
}
PreferencePackManager::PreferencePackManager()
{
auto modPath = fs::path(App::Application::getUserAppDataDir()) / "Mod";
@@ -526,4 +524,16 @@ void Gui::PreferencePackManager::DeleteOldBackups() const
}
}
}
}
std::vector<boost::filesystem::path> Gui::PreferencePackManager::configBackups() const
{
std::vector<boost::filesystem::path> results;
auto backupDirectory = fs::path(App::Application::getUserAppDataDir()) / "SavedPreferencePacks" / "Backups";
if (fs::exists(backupDirectory) && fs::is_directory(backupDirectory)) {
for (const auto& backup : fs::directory_iterator(backupDirectory)) {
results.push_back(backup);
}
}
return results;
}