Version: 3.1.1 (using KDE 3.1.1) Installed from: SuSE Compiler: gcc version 3.3 20030226 (prerelease) (SuSE Linux) OS: Linux (i686) release 2.4.20-4GB When I use the "Create new..." function in Konqueror file mode to create a new file the extension will not be added. I enter a directory, right-click on the background for the context menu, select "Create new..." and "Text Document...", and I am asked to enter a name. I enter "Test" and it will create a document called "Test", not "Test.kwd". This is a problem, especially on non-local file systems, because there the mime magic does not always work. When I use fish the document is shown as a Zip file, not as a KWord file.
Extra comments: Mime magic doesn't always work even when browsing normally E.g. A new 'Illustration Document' is guessed to be a Zip Archive (because it is) A new 'Zip Archive' is guessed to be plain text Even if the mime-magic works perfectly on my system, many systems rely on file name extension, so there should be some attempt to provide the correct extension.
I can confirm this bug for 3.5.9 and trunk r803905. If possible maybe the part could propose a name containing the right extension but this depends on what the developers want it to do.
This is still valid on KDE 4.
*** Bug 245494 has been marked as a duplicate of this bug. ***
Confirmed on 4.5 in my opinion the extension should be added to the file name for all entries under the "Create New" menu. Even if it where only to be consistent with the majority of files on a computer that all have a extension. Peter, what's your opinion? Or why did you even choose to do it without extensions in the first place?
I also think adding an extension automatically would be a nice thing. > Or why did you even choose to do it without extensions in the first place? The code is not part of Dolphin, but somewhere handled in the context of the kdelibs class KNewFileMenu.
Confirming on Dolphin / KDE 4.8.1 / Arch Linux x86_64. Moreover, if the name you specify contains something like an extension (for example, "1.txt") then the file is created with a .desktop extension ("1.txt.desktop"). This happens for many of the file types available on my system (Text document, HTML document, Link to URL).
@Nikos: indeed, this bug has been introduced in KDE 4.8 :-( ( bug #295490 )
Ohh, this bug is from 2003? Propably won't be changed then. Bummer!
Git commit ad0bbeebc568bc3d33bd3d17212d5b44b3d3bb79 by Ahmad Samir. Committed on 28/03/2020 at 16:59. Pushed by ahmadsamir into branch 'master'. [KNewFileMenu] Add extension to proposed filename Summary: Using "create new" text or html file, add the extension to the proposed filename, this makes those plain text files work for other OS's e.g. Windows (with Linux plain text files (.txt) don't usually have a extension relying on mimetype detection); as for but HTML filenames they do have extensions even on Linux. Adapt the knewfilemenutest to the changes. Test Plan: make && ctest; and using the create name text/html file menu in dolphin Reviewers: #frameworks, dfaure Reviewed By: dfaure Subscribers: kde-frameworks-devel Tags: #frameworks Differential Revision: https://phabricator.kde.org/D28302 M +3 -3 autotests/knewfilemenutest.cpp M +6 -1 src/filewidgets/knewfilemenu.cpp https://commits.kde.org/kio/ad0bbeebc568bc3d33bd3d17212d5b44b3d3bb79