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 416546 - nautilus modifies .desktop files when viewing properties
nautilus modifies .desktop files when viewing properties
Status: RESOLVED OBSOLETE
Product: nautilus
Classification: Core
Component: File Properties Dialog
2.17.x
Other Linux
: Normal minor
: ---
Assigned To: Nautilus Maintainers
Nautilus Maintainers
Depends on:
Blocks:
 
 
Reported: 2007-03-09 18:57 UTC by Sebastien Bacher
Modified: 2010-07-07 21:46 UTC
See Also:
GNOME target: ---
GNOME version: 2.17/2.18



Description Sebastien Bacher 2007-03-09 18:57:36 UTC
The bug has been opened on https://launchpad.net/ubuntu/+source/nautilus/+bug/89209

"Binary package hint: nautilus

Create a .desktop file with the contents:

[Desktop Entry]
Name=Ubuntu
Type=Link
URL=http://www.ubuntu.com

Now start nautilus, right-click the file, select properties. Click on the "Link" tab. At this instant the files has been modified without actually changing the fields. The contents are now:

[Desktop Entry]
Version=1.0
Encoding=UTF-8
Name=Ubuntu
Type=Link
URL=http://www.ubuntu.com
GenericName[en_US]=

A file manager should *never* change a file without user consent."
Comment 1 Christian Kirbach 2007-03-10 17:07:25 UTC
error: required key "Encoding" not found

Thus is is actually an invalid .desktop file fed to nautilus.

Adding the "Encoding" Property is in my opinion  a feature, not a bug ;)

However, I have no idea why the Version and GenericName fields are added. I see no reason for this. Can someone shed light on this?

Comment 2 Christof Krüger 2007-03-11 10:05:45 UTC
I agree that the original .desktop file might have been invalid. However, even if .desktop files are special to nautilus, nautilus should not change them without user consent.

Someone or some program could use files that have a ".desktop" suffix without having anything to do with freedesktop .desktop files. In a heterogeneous world it's not good for nautilus to assume that every .desktop file must have the format it expects and if it does not to modify it.

When browsing and viewing properties in the properties dialog, I don't expect a file browser to change anything at all until I actually click somewhere. Just selecting the "Link" tab is not enough to assume user consent to modify the file. File modification should not take place until the user actually types something inside the text boxes.

However, this might be non critical since most of the files with a ".desktop" suffix are actually intended to be freedesktop .desktop files. Nevertheless, I believe that being conservative is important when dealing with data corruption - no matter how improbable it may seem.
Comment 3 Pierre-Yves Luyten 2010-07-07 20:53:30 UTC
obsolete . Maybe due to freedesktop standard change. Anyway it cannot be reproduced on version 2.30
Comment 4 Christof Krüger 2010-07-07 21:41:32 UTC
Being the initial bug reporter, I fully agree. This can be closed.
Comment 5 Tobias Mueller 2010-07-07 21:46:13 UTC
Closing as per comment #4.