-
Notifications
You must be signed in to change notification settings - Fork 287
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
Add a posix-native copy_file. #205
Conversation
This PR is part of the std::filesystem removal-on-POSIX project.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I want the toctou fixed, but other than that looks pretty good.
src/vcpkg/base/files.cpp
Outdated
if (destination_exists && source_stat.st_dev == destination_stat.st_dev && | ||
source_stat.st_ino == destination_stat.st_ino) | ||
{ | ||
// /4 exists(to) i s true and equivalent(from, to) is true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// /4 exists(to) i s true and equivalent(from, to) is true | |
// /4 exists(to) is true and equivalent(from, to) is true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved with much gnashing of teeth about how the standard is specified.
This PR is part of the std::filesystem removal-on-POSIX project.