Opened 20 months ago

Last modified 7 months ago

#14092 new bug

File time stamps - Haiku mis-handles FAT32 time stamps

Reported by: Stacked_Lambda Owned by: nobody
Priority: normal Milestone: Unscheduled
Component: File Systems/FAT Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Has a Patch: no Platform: All

Description

Haiku mis-handles the file created and file last modified time stamps on FAT32 volumes which are exchanged between Haiku and Windows.

The issue is likely related to https://dev.haiku-os.org/ticket/14069 which is in the context of file exchange between Haiku and Linux.

I have exchanged files between Haiku and Windows via FAT32 formatted flash drives and noted the following:

Haiku reports the same time stamps for file creation and file last modification for all files and folders on the FAT32 volume. When mounted in Windows, most of these files and folders have file creation time stamps earlier than file last modification time stamps (i.e. they have been edited a number of times since they have been created).

When saving a file to a FAT32 volume, Haiku sets a file creation date time stamp which is showing as blank when the volume is mounted in Windows.

Haiku respects the file last modification time stamps when copying from FAT32 to BFS and from BFS to FAT32.

Change History (2)

comment:1 by Stacked_Lambda, 20 months ago

Providing some clarifications and test results.

The blanking of the file creation time when mounting a FAT32 volume in Windows for files copied to that volume by Haiku was a R1 - Alpha 4.1 thing. HRev51877 does not do that.

The following tests were performed with HRev51877.

Mounting a FAT32 volume:

For files and folders, the file last modified time stamp is the same as the file created time stamp. This, even for files which have been created years ago and modified several times since their creation.

Copying from a BFS volume to a FAT32 volume:

The file last modified time stamp is updated to be the same as the file created time stamp and corresponds to the date-time at which the file was copied to the volume.

Copying from a NTFS volume to a FAT32 volume:

The file last modified time stamp is the date-time at which the file was copied to the volume. However, the file created time stamp is months and years into the future. For example, a file originally from October 2016 on the NTFS volume and copied today becomes "modified" today and "created" in October 2083.

Coming from the Windows world, there are two expected behaviors with respect to time stamps:

  • file last modified time stamp is that at which the actual contents of the file were modified.
  • file created time stamp is that at which the file was added to a volume/folder when created or copied (cloned?); it is not updated when the file is moved across volumes or folders.

The last accessed time stamp is what it is, and is only shown when explicitly inquiring about the properties of a file or folder.

To be frank, I am uncertain of what conventions exist for file time stamps in BeOS/Haiku.

comment:2 by waddlesplash, 7 months ago

Component: - GeneralFile Systems/FAT
Note: See TracTickets for help on using tickets.