You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
When Vcpkg is checked into a TFS source control, commands that require files to be removed/renamed fail with std::errc::operation_not_permitted error. This is due to TFS only allowing reads of files under its source control.
One method Vcpkg gets around this is in the remove_package function, on line 76, where the following line is called: fs::stdfs::permissions(target, fs::perms::owner_all | fs::perms::group_all, ec);
However, this is specific to some files, and not all removals carry out the above to ensure the removal takes place.
Because we are dealing with removals, we should ensure files are forcibly removed if we get std::errc::operation_not_permitted. The intent is to remove the file, so changing its permission to allow removals doesn't produce unnecessary side effects.
Proposed solution
Move the fs::stdfs::permissions(target, fs::perms::owner_all | fs::perms::group_all, ec); action to the low-level remove/rename functions so that it applies to all removals.
category:vcpkg-featureThe issue is a new capability of the tool that doesn’t already exist and we haven’t committed
1 participant
Converted from issue
This discussion was converted from issue #8170 on July 22, 2021 03:14.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Is your feature request related to a problem? Please describe.
When Vcpkg is checked into a TFS source control, commands that require files to be removed/renamed fail with
std::errc::operation_not_permitted
error. This is due to TFS only allowing reads of files under its source control.One method Vcpkg gets around this is in the
remove_package
function, on line 76, where the following line is called:fs::stdfs::permissions(target, fs::perms::owner_all | fs::perms::group_all, ec);
However, this is specific to some files, and not all removals carry out the above to ensure the removal takes place.
Because we are dealing with removals, we should ensure files are forcibly removed if we get
std::errc::operation_not_permitted
. The intent is to remove the file, so changing its permission to allow removals doesn't produce unnecessary side effects.Proposed solution
Move the
fs::stdfs::permissions(target, fs::perms::owner_all | fs::perms::group_all, ec);
action to the low-level remove/rename functions so that it applies to all removals.Please see this for the changes proposed
Happy to create a PR if people are happy with the proposed changes.
Thanks
Beta Was this translation helpful? Give feedback.
All reactions