Skip to content

F* functions don't work for some files on macOS.#76

Merged
kuba-- merged 1 commit intopkg:masterfrom
andy-js:darwin-fixes
Jun 30, 2025
Merged

F* functions don't work for some files on macOS.#76
kuba-- merged 1 commit intopkg:masterfrom
andy-js:darwin-fixes

Conversation

@andy-js
Copy link
Contributor

@andy-js andy-js commented Jun 30, 2025

I was seeing instances where FGet on a file was returning "no such file or directory" but Get on the same file was succeeding. I traced it back to the use of the Name() method in fgetxattr. The Name() method typically only returns the full path for temporary files, and includes the file name everywhere else. To obtain the full path from an open file we can use fnctl with the F_GETPATH flag. This is a macOS specific API.

@kuba-- kuba-- merged commit 05b05ed into pkg:master Jun 30, 2025
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.

2 participants