linuxmint / xed

X-Apps [Text] Editor (Cross-DE, backward-compatible, GTK3, traditional UI)
GNU General Public License v2.0
456 stars 85 forks source link

When saving, actually creates a new file (new inode) and updated creation time #302

Open Enjymon opened 5 years ago

Enjymon commented 5 years ago
 * Xed version 2.0.2
 * Distribution - Mint 19.1

Issue

As explained in the title, when one opens an existing document with Xed and then saves the document, instead of just an update of the content of the file and of the modification time, the document is in fact saved in a brand new file, with a new inode number and an updated creation time.

This renders unreliable the creation time for the document.

The problem does not occur with other editors like nano for instance.

Steps to reproduce

  1. Check the timestamps of a document in a file explorer and/or Check the inode and timestamps in command line using: 1- stat /path/to/document 2- sudo debugfs -R 'stat /full/path/to/document' /dev/sdXn | grep crtime
  2. Open the document with Xed
  3. Save it as is
  4. Check the inode number and timestamps again

Expected behaviour

The inode number should be unchanged. The creation time should stay unchaged too.

Other information

I have also tested with gedit in Manjaro 18.02 and the problem occurs there too, so maybe the problem is in a package on which both Xed and gedit depend, but this is hard to tell from the user's side.

carlosmintfan commented 3 months ago

Experiencing the same issue in Mint 21.3