| 338 | } |
| 339 | |
| 340 | static std::uint32_t RemovePermissionsFromCurrent(std::uint32_t currentMode, FileSystem::Permission mode) |
| 341 | { |
| 342 | if ((mode & FileSystem::Permission::Read) == FileSystem::Permission::Read) |
| 343 | currentMode &= ~S_IRUSR; |
| 344 | if ((mode & FileSystem::Permission::Write) == FileSystem::Permission::Write) |
| 345 | currentMode &= ~S_IWUSR; |
| 346 | if ((mode & FileSystem::Permission::Execute) == FileSystem::Permission::Execute) |
| 347 | currentMode &= ~S_IXUSR; |
| 348 | |
| 349 | return currentMode; |
| 350 | } |
| 351 | |
| 352 | # if !defined(DEATH_TARGET_SWITCH) |
| 353 | static std::int32_t DeleteDirectoryInternalCallback(const char* fpath, const struct stat* sb, std::int32_t typeflag, struct FTW* ftwbuf) |