Skip to content

Update modified time when closing written files#86

Open
Old-Ding wants to merge 1 commit into
FreeRTOS:mainfrom
Old-Ding:codex/update-modified-time-on-close
Open

Update modified time when closing written files#86
Old-Ding wants to merge 1 commit into
FreeRTOS:mainfrom
Old-Ding:codex/update-modified-time-on-close

Conversation

@Old-Ding

@Old-Ding Old-Ding commented Jul 1, 2026

Copy link
Copy Markdown

Closes #81

Summary

  • Add ffconfigUPDATE_FILE_MODIFIED_TIME_ON_CLOSE, defaulting to 0 to preserve existing close-time behavior.
  • Track actual file changes with FF_VALID_FLAG_MODIFIED after successful writes or EOF truncation.
  • Reuse the existing FF_Close() directory-entry update to refresh xModifiedTime when the opt-in config is enabled.

Testing

  • git diff --check upstream/main...HEAD
  • Verified touched files are UTF-8 without BOM and use CRLF line endings.
  • Not run: cmake -S test/unit-test -B test/unit-test/build/ because cmake is unavailable on this Windows host; Ruby and a C compiler are also unavailable locally.

@Old-Ding Old-Ding marked this pull request as ready for review July 1, 2026 07:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] FF_Close() does not update xModifiedTime with current system time when file is modified (ffconfigTIME_SUPPORT=1)

2 participants