Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMDR-DOS: Timestamping on newly created directory only works on hostfs #169

Open
JimmyDansbo opened this issue Sep 21, 2023 · 1 comment
Assignees
Labels
enhancement New feature or request priority-low Low priority. Ok if not completed.

Comments

@JimmyDansbo
Copy link
Contributor

If an SD card image is mounted in the emulator and a directory is created with DOS"MD:SOMEDIR", it seems the timestamp is not written correctly, even when the emulator is started with -rtc
Following, DOS"$=L" will not show timestamp and filesize.

When the SD card image is mounted in linux, I can see that the timestamp of a directory created with DOS"MD:SOMEDIR" is 1980-01-01 01:00:00

The issue does not exist when using hostfs

@mooinglemur mooinglemur self-assigned this Sep 24, 2023
@mooinglemur mooinglemur added bug Something isn't working priority-low Low priority. Ok if not completed. labels Sep 24, 2023
@mooinglemur mooinglemur added enhancement New feature or request and removed bug Something isn't working labels Oct 6, 2023
@mooinglemur
Copy link
Collaborator

The current X16 DOS/FAT32 code does not have support for timestamps on directories. If the file already has a timestamp, it won't be touched, but this is also true for mtime on directories when files are created inside.

Adding such support would only be partial until there is code to ensure that directories also have their mtimes updated when their contents change.

I initially thought this would be a simple change but it's more complex than I expected to get it right. I'll have to get back to it when I have had time to study the FAT32 spec.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request priority-low Low priority. Ok if not completed.
Projects
None yet
Development

No branches or pull requests

2 participants