impr: Only auto backup if there's something to backup
This commit is contained in:
parent
b934ca6ad3
commit
ec64952cb4
@ -69,7 +69,7 @@ namespace hex::plugin::builtin {
|
||||
if (autoBackupTime > 0 && (now - lastBackupTime) > std::chrono::seconds(autoBackupTime)) {
|
||||
lastBackupTime = now;
|
||||
|
||||
if (ImHexApi::Provider::isValid()) {
|
||||
if (ImHexApi::Provider::isValid() && ImHexApi::Provider::isDirty()) {
|
||||
for (const auto &path : fs::getDefaultPaths(fs::ImHexPath::Backups)) {
|
||||
const auto fileName = hex::format("auto_backup.{:%y%m%d_%H%M%S}.hexproj", fmt::gmtime(std::chrono::system_clock::now()));
|
||||
if (ProjectFile::store(path / fileName, false))
|
||||
|
Loading…
Reference in New Issue
Block a user