fix: Ensure projects have .hexproj extension on save (#274)

This commit is contained in:
jam1garner 2021-07-31 12:05:21 -04:00 committed by GitHub
parent 92bb852921
commit 68df6d37f7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 1 deletions

View File

@ -446,7 +446,12 @@ namespace hex {
if (ProjectFile::getProjectFilePath() == "") {
View::openFileBrowser("hex.view.hexeditor.save_project"_lang, DialogMode::Save, { { "Project File", "hexproj" } }, [](auto path) {
if (path.ends_with(".hexproj")) {
ProjectFile::store(path);
}
else {
ProjectFile::store(path + ".hexproj");
}
});
}
else