https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71320

            Bug ID: 71320
           Summary: filesystem::permissions does not respect
                    add_perms/remove_perms
           Product: gcc
           Version: 6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: eric at efcs dot ca
  Target Milestone: ---

Created attachment 38585
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38585&action=edit
reproducer.cpp

filesystem::permissions ignores add_perms and remove_perms, instead always
setting the file permissions to the specified value.

For example:

permissions(file, perms::owner_all);
assert(status(file).permissions() == perms::owner_all); // works

// Add some additional permissions
permissions(file, perms::group_all | perms::add_perms);
assert(status(file).permissions() == (perms::owner_all | perms::group_all)); //
FIRES
assert(status(file).permissions() == perms::group_all); // Doesn't fire

Reply via email to