Bug 197840

Summary: Creating a link to the folder on the desktop ends with ".desktop"
Product: [Applications] konqueror Reporter: Einar Lielmanis <einars+kdebugs>
Component: generalAssignee: David Faure <faure>
Status: RESOLVED FIXED    
Severity: wishlist CC: aseigo
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Einar Lielmanis 2009-06-25 15:25:29 UTC
Version:           svn:986516 (using Devel)
OS:                Linux
Installed from:    Compiled sources

On the desktop folderview, when creating links to other folders, the names have a needless ".desktop" extension,

rclick on desktop folder,
create new...
Link to location (URL)...
type in e.g ~/Pictures (file name: Pictures)

expected: an icon leading to "~/Pictures", named "Pictures"
got: an icon leading to "~/Pictures" named "Pictures.desktop"
Comment 1 Aaron J. Seigo 2009-06-26 07:03:42 UTC
it also happens in dolphin; it's a bug in libkonq.
Comment 2 Aaron J. Seigo 2009-06-26 07:04:57 UTC
David: is this the right component for libkonq bugs?

in any case, the problem is in KNewMenu::slotActionTriggered(QAction* action).

if ( KDesktopFile::isDesktopFile( entry.templatePath ) ) is true, and so is if ( df.readType() == "Link" ), and so it appends ".desktop" to the resulting target a few lines later.
Comment 3 David Faure 2009-08-27 17:19:46 UTC
Well, that's because it's a desktop file and not a symlink :-)
But yeah, extensions aren't strictly necessary, since we detect files without it too. I found that I added that logic in 2000, (r62771), so things were different back then.

But I think what you really wanted was a symlink. Wish/Bug 66248, basically, no? (although, as discussed there, the problem is that the icon of the symlink cannot be changed)
Comment 4 David Faure 2009-08-27 17:20:55 UTC
SVN commit 1016350 by dfaure:

respect the user's wish and don't append .desktop to the filename. Fix will be in 4.3.1
BUG: 197840


 M  +0 -2      knewmenu.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1016350