fs-uae icon indicating copy to clipboard operation
fs-uae copied to clipboard

Possible bug with timestamps on overwritten directory hard drive files

Open FrodeSolheim opened this issue 8 years ago • 2 comments

Possible bug mentioned at http://fs-uae.net/using-hard-drives/comment-page-2#comment-939489:

Niklas Lindholm wrote:

I have a different timestamp problem that is still present in 2.6.1. I’m running Linux (Ubuntu 14.04LTS) and all my Amiga partitions are directories in the host system. When creating a new file the file timestamp is correct. But when a file is written without being deleted first the timestamp is never updated as the Amiga sees it.

When looking at it from the Linux side it looks like: Time stamp of actual file: old time Time stamp of .uaem file: new (correct) time Time stamp written inside .uaem file: old time

FrodeSolheim avatar Nov 09 '15 22:11 FrodeSolheim

I have found another timestamp problem. When creating a directory the timestamp of the parent directory is incorrectly updated. For me it gets a timestamp in the future. But I think it sets the timestamp to the current time in UTC. So for Europe I guess it would get a timestamp that is one hour in the past. (Right now, without DST.) This seems only to happen when creating directories. When creating files the parent timestamp is updated to the current time.

In this example I first create a directory foo on the Amiga side. This is how it looks from the Linux side.

niklas@reggaeton:~/Amiga/Tmp/tstest$ ll
total 8
drwxr-xr-x 2 niklas niklas 4096 Nov 12 19:31 foo
-rw-rw-r-- 1 niklas niklas   33 Nov 12 19:31 foo.uaem
niklas@reggaeton:~/Amiga/Tmp/tstest$ cat foo.uaem
----rwed 2015-11-12 19:31:03.60

Then I create a directory bar inside foo.

niklas@reggaeton:~/Amiga/Tmp/tstest$ ll
total 8
drwxr-xr-x 3 niklas niklas 4096 Nov 13  2015 foo
-rw-rw-r-- 1 niklas niklas   33 Nov 12 19:31 foo.uaem
niklas@reggaeton:~/Amiga/Tmp/tstest$ cat foo.uaem
----rwed 2015-11-13 03:31:27.00
niklas@reggaeton:~/Amiga/Tmp/tstest$ ll foo
total 8
drwxr-xr-x 2 niklas niklas 4096 Nov 12 19:31 bar
-rw-rw-r-- 1 niklas niklas   33 Nov 12 19:31 bar.uaem
niklas@reggaeton:~/Amiga/Tmp/tstest$ cat foo/bar.uaem
----rwed 2015-11-12 19:31:27.74

And this is the time of my system.

niklas@reggaeton:~/Amiga/Tmp/tstest$ date
Thu Nov 12 19:32:18 PST 2015

punktniklas avatar Nov 13 '15 03:11 punktniklas

@punktniklas Your issue is different from the one originally reported. You should open a separate github issue for that.

blubberdiblub avatar Mar 23 '17 21:03 blubberdiblub