linuxmint / nemo

File browser for Cinnamon
GNU General Public License v2.0
1.23k stars 300 forks source link

Nemo is changing file content and filetype on rename, if the file originally had the .theme type #3457

Open hallgat89 opened 1 month ago

hallgat89 commented 1 month ago

Distribution

Ubuntu 24.04.1 LTS

Package version

6.0.2

Frequency

Always

Bug description

Nemo is changing file content and filetype on rename, if the file originally had the .theme type.

Steps to reproduce

  1. In Nemo create a new file empty.theme
  2. Rename it to renamed.theme

Bug:

  1. The real file extension is now 'renamed.theme.desktop' and Nemo changes the file content to: [Desktop Entry] Name[hu]=renamed.theme
  2. Nemo hides the .desktop extension, so it's hard to notice
  3. Nemo changed the files contents without telling me

This caused me tons of problems when trying to create themes for xfce4-terminal (.theme files). Nemo invalidated my files by changing their type, and inserting new lines.

Expected behavior

  1. In Nemo create a new file empty.theme
  2. Rename it to renamed.theme

Expected behavior: The file is renamed without any side-effects.

Additional information

No response

Jeremy7701 commented 1 month ago

Also reproduced on nemo 6.2.8 in LMDE6

Example:- empty text file z.theme becomes zz.theme.desktop on rename to zz.theme. The /n character is retained from the "empty" file.


[Desktop Entry]
Name[en_GB]=zz.theme

Note: If you had renamed your theme with a CLI command such as mv, there would have been no problem.