mirror of https://github.com/WerWolv/ImHex.git
fix: Ensure projects have .hexproj extension on save (#274)
This commit is contained in:
parent
92bb852921
commit
68df6d37f7
|
@ -446,7 +446,12 @@ namespace hex {
|
||||||
|
|
||||||
if (ProjectFile::getProjectFilePath() == "") {
|
if (ProjectFile::getProjectFilePath() == "") {
|
||||||
View::openFileBrowser("hex.view.hexeditor.save_project"_lang, DialogMode::Save, { { "Project File", "hexproj" } }, [](auto path) {
|
View::openFileBrowser("hex.view.hexeditor.save_project"_lang, DialogMode::Save, { { "Project File", "hexproj" } }, [](auto path) {
|
||||||
|
if (path.ends_with(".hexproj")) {
|
||||||
ProjectFile::store(path);
|
ProjectFile::store(path);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
ProjectFile::store(path + ".hexproj");
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue