[Libreoffice-bugs] [Bug 125401] FILESAVE: Saving a document creates a new file (new inode number) thereby messing-up with the creation time of the document

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Tue Jul 9 19:12:32 UTC 2019


https://bugs.documentfoundation.org/show_bug.cgi?id=125401

--- Comment #15 from Alex <alex.dwd at gmail.com> ---
(In reply to Miklos Vajna from comment #14)
> I got back to this and I'm afraid 'cp -a' can't copy the creation time of
> the destination document after all.
> 
> Here is what I tried:
> 
> 1) Save test.odt using Writer.
> 
> 2) Check creation time:
> 
> $ sudo debugfs -R "stat $PWD/test.odt" /dev/mapper/system-root | grep crtime
> crtime: 0x5d246d4a:24aeed68 -- Tue Jul  9 12:32:42 2019
> 
> 3) 'cp -a test.odt test2.odt'
> 
> 4) Check creation time of test2.odt:
> 
> $ sudo debugfs -R "stat $PWD/test2.odt" /dev/mapper/system-root | grep crtime
> crtime: 0x5d246eaf:7a4c63cc -- Tue Jul  9 12:38:39 2019
> 
> Based on this, I still think we can't do much here -> closing, sorry. The
> document has meta.xml BTW, which always contains the creation / modification
> time, and that is correct.
> 
> If it is discovered that there is some sane API we can use, similar to
> stat() and S_ISLNK(), then it would make sense to reopen this.
> 
> (Marking as "not our bug", given that this works fine on Windows, it's a
> shorcoming of the APIs we have available inside #ifdef UNX, I would say.)

Hello Miklos and thank you for looking into this.

Following your explanation, I fear you did not get the point.

Of course if you copy a file using 'cp -a SOURCE DEST' to a NEW (non existing)
destination file DEST, the new destination will have an updated creation time
(since it is created at the time the 'cp' command is called.

However, the command 'cp -a SOURCE DEST' applied to an already existing DEST
file preserves the creation time of DEST.

This is what could be used to preserve the creation time of any document being
edited, where SOURCE would be the cached and currently being edited version,
and DEST the initial file from which the edition resumed.

Could you consider reassessing the scenario and therefore maybe reopening the
bug?

Thanks,

Alex

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20190709/96872373/attachment.html>


More information about the Libreoffice-bugs mailing list