Created attachment 123492 [details] Screenshot of the error message. SUMMARY If we try to overwrite (through File > Create template from document) a previously created user template, Kile claims that creation failed and then deletes the file the user used to create the template. However, the template modification actually succeeds. STEPS TO REPRODUCE 1. Create a template. 2. Create a new .tex document using this template and make some changes in it. 3. File > Create template from document. 4. Choose to overwrite the existing template. OBSERVED RESULT Kile throws up an error saying 'failed to create template' (see attached screenshot). Once we dismiss the error, it then complains that the file has been deleted by another program. However, if we check the modified template by creating a new document, we find that the changes we made have actually been applied to the template, contrary to what the error message claimed. EXPECTED RESULT Kile should not falsely claim template creation failed. It should also not delete the document the user used to create the template. SOFTWARE/OS VERSIONS Linus distro: Arch Linux KDE Plasma Version: 5.17.0 KDE Frameworks Version: 5.63.0 Qt Version: 5.13.1 ADDITIONAL INFORMATION If we try to create a new template (using a previously nonexistent template name), it succeeds and does not delete the document used, as expected.
Git commit 7a55cf2d93c9daa13f2fa2ec1ae25646507cfc0c by Michel Ludwig. Committed on 01/12/2019 at 14:56. Pushed by mludwig into branch 'master'. Fix overriding of existing templates Also, don't delete the original file after the template has been created from it. M +3 -4 src/dialogs/managetemplatesdialog.cpp M +5 -73 src/templates.cpp M +4 -6 src/templates.h https://commits.kde.org/kile/7a55cf2d93c9daa13f2fa2ec1ae25646507cfc0c