Skip to content

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

@Enjymon

Description

@Enjymon
 * 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions