diff options
author | Ken Moore <moorekou@gmail.com> | 2015-12-02 16:29:36 -0500 |
---|---|---|
committer | Ken Moore <moorekou@gmail.com> | 2015-12-02 16:29:36 -0500 |
commit | 984a6d2872e9f567cbc3cfa582c105b32e65706a (patch) | |
tree | 1761ef6ec3ec3533a530bd8a256128c254b124cb /lumina-desktop | |
parent | Change the notepad plugin a bit: (diff) | |
download | lumina-984a6d2872e9f567cbc3cfa582c105b32e65706a.tar.gz lumina-984a6d2872e9f567cbc3cfa582c105b32e65706a.tar.bz2 lumina-984a6d2872e9f567cbc3cfa582c105b32e65706a.zip |
Oops, forgot to append the ".note" suffix before running the new name through the validation routine.
Diffstat (limited to 'lumina-desktop')
-rw-r--r-- | lumina-desktop/desktop-plugins/notepad/NotepadPlugin.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lumina-desktop/desktop-plugins/notepad/NotepadPlugin.cpp b/lumina-desktop/desktop-plugins/notepad/NotepadPlugin.cpp index 8e4121b8..435a57c2 100644 --- a/lumina-desktop/desktop-plugins/notepad/NotepadPlugin.cpp +++ b/lumina-desktop/desktop-plugins/notepad/NotepadPlugin.cpp @@ -152,6 +152,7 @@ QString NotePadPlugin::newNoteName(QString oldname, bool tryagain){ if(name.isEmpty() || dlg.result()!=QDialog::Accepted){ return ""; } //cancelled //Check validity of the new note filename QString fullpath = QDir::homePath()+"/Notes/"+name; + if(!fullpath.endsWith(".note")){ fullpath.append(".note"); } if(QFile::exists(fullpath)){ return newNoteName(name, true); //try again } |