mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-03-28 07:47:03 -05:00
impr: Make crash restore popup not show up if there's nothing to restore
This commit is contained in:
@@ -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", ""),
|
||||
|
||||
Reference in New Issue
Block a user