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

Use rename/unlink/etc. instead of renameat/unlinkat`/etc. #247

Merged
merged 1 commit into from
Aug 6, 2023

Conversation

sunfishcode
Copy link
Contributor

Rustix on Haiku doesn't support CWD, so use the non-at versions of functions, since tempfile was only ever passing CWD to them.

For link, switch to std::fs::hard_link, since the link function has platform-dependent behavior and std has code to deal with that. This should also help portability to some platforms which lack linkat.

Rustix on Haiku doesn't support `CWD`, so use the non-`at` versions
of functions, since tempfile was only ever passing `CWD` to them.

For `link`, switch to `std::fs::hard_link`, since the `link` function
has platform-dependent behavior and std has code to deal with that.
This should also help portability to some platforms which lack
`linkat`.
Copy link
Contributor

@asomers asomers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks for the quick fix.

@Stebalien Stebalien merged commit a5c236c into Stebalien:master Aug 6, 2023
@sunfishcode sunfishcode deleted the sunfishcode/avoid-cwd branch August 7, 2023 01:47
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.

3 participants