From 68df6d37f760d18efa85d55593fb4458aed16228 Mon Sep 17 00:00:00 2001 From: jam1garner <8260240+jam1garner@users.noreply.github.com> Date: Sat, 31 Jul 2021 12:05:21 -0400 Subject: [PATCH] fix: Ensure projects have .hexproj extension on save (#274) --- source/views/view_hexeditor.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/source/views/view_hexeditor.cpp b/source/views/view_hexeditor.cpp index a3e9b57de..d36634e9a 100644 --- a/source/views/view_hexeditor.cpp +++ b/source/views/view_hexeditor.cpp @@ -446,7 +446,12 @@ namespace hex { if (ProjectFile::getProjectFilePath() == "") { View::openFileBrowser("hex.view.hexeditor.save_project"_lang, DialogMode::Save, { { "Project File", "hexproj" } }, [](auto path) { - ProjectFile::store(path); + if (path.ends_with(".hexproj")) { + ProjectFile::store(path); + } + else { + ProjectFile::store(path + ".hexproj"); + } }); } else