filesystem icon indicating copy to clipboard operation
filesystem copied to clipboard

Fix `ghc::filesystem::last_write_time()` setter on iOS/tvOS/watchOS

Open kkaefer opened this issue 3 years ago • 1 comments

The previous implementation tried to detect old deployment targets for macOS that doesn't have the newer utimensat call. Unfortunately, it would just detect macOS, and didn't check for the corresponding iOS/tvOS/watchOS version numbers. On those platforms, last_write_time() was effectively a no-op, failing silently and not modifying the mtime of the file.

This patch adds detection for these platforms. It also removes the special casing when newer versions of macOS/iOS/tvOS/watchOS are used as the deployment targets, and instead folds it into the default POSIX branch.

kkaefer avatar Jul 27 '22 16:07 kkaefer

Thanks for the PR, but I would need to look into this more. I don't see those as macOS variants and they shouldn't be detected as such... I'll try to look into it next weekend if possible.

gulrak avatar Sep 06 '22 19:09 gulrak

Thank you for the nice solution, it is for sure better than the current state.

gulrak avatar Feb 17 '23 16:02 gulrak