NSFileWrapper Sometimes Changes Modification Date to the Past
Shiny Frog’s (of Bear.app fame) Matteo Rattoti shared a repository to demonstrate a NSFileWrapper Modification Date Bug:
This repository demonstrates a bug in
NSFileWrapper
where overwriting a file with the same content using-[NSFileWrapper writeToURL:options:originalContentsURL:error:]
sometimes causes the file’s modification date to be set in the past instead of updating to the current time.
It happens about 50% of the time.
Can reproduce on macOS Sonoma.