Lines 1385-1398
Link Here
|
1385 |
else if (prms & remove_perms) |
1385 |
else if (prms & remove_perms) |
1386 |
prms = current_status.permissions() & ~prms; |
1386 |
prms = current_status.permissions() & ~prms; |
1387 |
|
1387 |
|
1388 |
// Mac OS X Lion and some other platforms don't support fchmodat() |
1388 |
// Don't use fchmodat() since AT_SYMLINK_NOFOLLOW is not implemented on Linux |
1389 |
# if defined(AT_FDCWD) && defined(AT_SYMLINK_NOFOLLOW) \ |
1389 |
if (::chmod(p.c_str(), mode_cast(prms))) |
1390 |
&& (!defined(__SUNPRO_CC) || __SUNPRO_CC > 0x5100) |
|
|
1391 |
if (::fchmodat(AT_FDCWD, p.c_str(), mode_cast(prms), |
1392 |
!(prms & symlink_perms) ? 0 : AT_SYMLINK_NOFOLLOW)) |
1393 |
# else // fallback if fchmodat() not supported |
1394 |
if (::chmod(p.c_str(), mode_cast(prms))) |
1395 |
# endif |
1396 |
{ |
1390 |
{ |
1397 |
if (ec == 0) |
1391 |
if (ec == 0) |
1398 |
BOOST_FILESYSTEM_THROW(filesystem_error( |
1392 |
BOOST_FILESYSTEM_THROW(filesystem_error( |