diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2015-08-22 23:00:59 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2015-08-22 23:00:59 +0200 |
commit | c15a456ac6df79a001250fc5b877751db4a30875 (patch) | |
tree | 4b6323f442854670297af033af3019ee7eb6b81b /facetracknoir/new_file_dialog.h | |
parent | 9cd5ab67dbe347d1f4dcf4a6eb3f4fd7e3d89dab (diff) |
ui: append extension in the right place
Otherwise, file can be overwritten accidentally
Diffstat (limited to 'facetracknoir/new_file_dialog.h')
-rw-r--r-- | facetracknoir/new_file_dialog.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/facetracknoir/new_file_dialog.h b/facetracknoir/new_file_dialog.h index dc821592..d72b8741 100644 --- a/facetracknoir/new_file_dialog.h +++ b/facetracknoir/new_file_dialog.h @@ -34,6 +34,8 @@ private slots: QString text = ui.lineEdit->text(); text = text.replace('/', ""); text = text.replace('\\', ""); + if (text != "" && !text.endsWith(".ini")) + text += ".ini"; if (text == "" || QFile(options::group::ini_directory() + "/" + text).exists()) { QMessageBox::warning(this, |