After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 651838 - Renaming a non-executable .desktop file causes an additional .desktop extension to be added
Renaming a non-executable .desktop file causes an additional .desktop extensi...
Status: RESOLVED DUPLICATE of bug 688632
Product: nautilus
Classification: Core
Component: File and Folder Operations
3.24.x
Other Linux
: Low normal
: ---
Assigned To: Nautilus Maintainers
Nautilus Maintainers
Depends on:
Blocks: 688632
 
 
Reported: 2011-06-04 08:27 UTC by Eugene
Modified: 2018-05-09 16:50 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Eugene 2011-06-04 08:27:49 UTC
Hi.

If .desktop file is non-executable, nautilus shows its full name (together with .desktop extension), at least in Compact View.  If such a file is executable, nautilus shows only its name (without the extension).

The bug is that if you rename a non-executable file, nautilus appends additional .desktop extension, which results in two extensions.  It is good for executable .desktop files, because in that case the string you are editing when renaming a file does not have .desktop extension, but it is faulty for non-executable files, because the extension is already there.

To reproduce:
- Open nautilus and go to ~/.config/autostart/ directory;
- If there are no files there, create a dummy command in `gnome-session-properties';
- There should be at least one non-executable .desktop file in the directory. Rename the file to change its base name (part of the file name without the 
extension) to something else 

What happens: additional .desktop extension is appended
What should happen: base name is changed, no additional extension is appended.

I also found a discussion at askubuntu.com:
http://askubuntu.com/questions/17220/can-nautilus-display-a-desktop-file-by-its-real-name/17262#17262

Nautilus 3.0.2
Comment 1 Scott Ritchie 2012-02-14 20:06:39 UTC
It's worse than that - nautilus actually modifies the _contents_ of the file on a rename operation (appending a blank line and a locale-specific name field).  This also happens when you drag and drop the .desktop file into Gedit, which is clearly not what someone using the file in this way wants.

See also: https://bugs.launchpad.net/ubuntu/+source/nautilus/+bug/815389  and its duplicates
Comment 2 Stephen 2017-09-27 11:25:50 UTC
Still an issue in Nautilus 3.24.
Comment 3 António Fernandes 2018-05-09 16:50:03 UTC
This problem has been fixed in the unstable development version. The fix will be available in the next major software release. You may need to upgrade your Linux distribution to obtain that newer version.

*** This bug has been marked as a duplicate of bug 688632 ***