1
0
mirror of synced 2025-01-18 17:14:13 +01:00

impr: Make crash restore popup not show up if there's nothing to restore

This commit is contained in:
WerWolv 2024-02-24 00:37:17 +01:00
parent 6b14facd29
commit cdde0dedc8

View File

@ -525,6 +525,15 @@ namespace hex::plugin::builtin {
auto backupFilePath = path / BackupFileName;
bool hasBackupFile = wolv::io::fs::exists(backupFilePath);
if (!hasProject && !hasBackupFile) {
log::warn("No project file or backup file found in crash.json file");
crashFile.close();
wolv::io::fs::remove(crashFilePath);
wolv::io::fs::remove(backupFilePath);
continue;
}
PopupRestoreBackup::open(
// Path of log file
crashFileData.value("logFile", ""),