[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] Fxattr giving wrong date values (was Re: zDesk desktop sources available)



On Sun, 2011-01-09 at 14:38 +0100, Andreas Schwab wrote:
> Jo Even Skarstein <joska@online.no> writes:
> 
> > On the older files, "last modification time" was always less than
> > "creation time", which is obviously wrong.
> 
> In which way is that wrong?  You can set the modtime any way you like.
> Just becase the file was created recently does not mean that the
> contents are new.

True, it can happen if you specifically set the modification time. But
normally the modification time will be set to the time the file in
question was last changed. And unless you change the time yourself this
will always be equal to or later than the creation time.

I just checked on some backup from 2005. It's on a F32 partition, and
the creation-time is always set to the date of the backup while the
modification time is set to the file's creation date. The
XATTR-structure is filled by Dxreaddir in this particular code.

I then created a new file on this partition. Both timestamps are now the
same and correct. I save the file again, and now the creation timestamp
is unchanged and the modified timestamp is updated. Again, the
timestamps are correct.

I then did the same tests on a ext2-partition. On files not touched for
years I got the same results as on the F32 partition. Separate creation-
and modified-timestamps, creation-date always after modified date. When
I created a new file, both dates where the same and correct. When I
saved the file again, both dates where updated.

Teradesk displays the modified timestamp only. Jinnee displays the same
results as my code.

So how come I get different creation- and modified-timestamps on old
files on ext2-partitions when ext2 according to other people on this
list only saves modification-time??

As for the swapped dates I have two theories:

1. The files with swapped dates were created by a copier/desktop with
buggy copy routines. I will do some tests with Thing and Jinnee which I
was using at the time that backup was made.

2. (1) doesn't explain why I got the same result on my ext2-partition,
as those files were written by tar. So another possible explanation is
that at one time there was a bug in MiNT which caused these two dates to
be swapped. The bug was at some time fixed, but files already touched
will of course still have the swapped dates.

To sum it up - I don't think there's something wrong with Fxattr, at
least not now.

Jo Even