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

Add a posix-native copy_file. #205

Merged
merged 6 commits into from
Oct 7, 2021
Merged

Conversation

BillyONeal
Copy link
Member

This PR is part of the std::filesystem removal-on-POSIX project.

This PR is part of the std::filesystem removal-on-POSIX project.
Copy link
Contributor

@strega-nil-ms strega-nil-ms left a 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 Show resolved Hide resolved
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
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
// /4 exists(to) i s true and equivalent(from, to) is true
// /4 exists(to) is true and equivalent(from, to) is true

src/vcpkg/base/files.cpp Outdated Show resolved Hide resolved
Copy link
Contributor

@strega-nil-ms strega-nil-ms left a 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.

@BillyONeal BillyONeal marked this pull request as draft October 1, 2021 02:50
@BillyONeal BillyONeal marked this pull request as ready for review October 7, 2021 03:24
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