From 0a114b1168bfb20ffcc429eb0a7621feb7077669 Mon Sep 17 00:00:00 2001 From: tildearrow Date: Mon, 21 Mar 2022 14:47:10 -0500 Subject: [PATCH] GUI: don't allow direct saving to the backup file --- src/gui/gui.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp index 42c12ed66..adf7c1a20 100644 --- a/src/gui/gui.cpp +++ b/src/gui/gui.cpp @@ -3682,7 +3682,7 @@ void FurnaceGUI::doAction(int what) { } break; case GUI_ACTION_SAVE: - if (curFileName=="" || e->song.version>=0xff00) { + if (curFileName=="" || curFileName==backupPath || e->song.version>=0xff00) { openFileDialog(GUI_FILE_SAVE); } else { if (save(curFileName,e->song.isDMF?e->song.version:0)>0) { @@ -5490,7 +5490,7 @@ bool FurnaceGUI::loop() { } ImGui::Separator(); if (ImGui::MenuItem("save",BIND_FOR(GUI_ACTION_SAVE))) { - if (curFileName=="" || e->song.version>=0xff00) { + if (curFileName=="" || curFileName==backupPath || e->song.version>=0xff00) { openFileDialog(GUI_FILE_SAVE); } else { if (save(curFileName,e->song.isDMF?e->song.version:0)>0) {