| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 7597d20 commit ad9a290
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1737,7 +1737,15 @@ static void RmSync(const FunctionCallbackInfo<Value>& args) { | |||
| 1737 | 1737 | } else if (error == std::errc::not_a_directory) { | |
| 1738 | 1738 | std::string message = "Not a directory: " + file_path_str; | |
| 1739 | 1739 | return env->ThrowErrnoException(ENOTDIR, "rm", message.c_str(), path_c_str); | |
| 1740 | + #ifdef _AIX | ||
| 1741 | + } else if (error == std::errc::permission_denied || | ||
| 1742 | + error == std::errc::file_exists) { | ||
| 1743 | + // Workaround for clang libc++ bug on AIX: std::filesystem::remove_all() | ||
| 1744 | + // incorrectly returns EEXIST (17) instead of EACCES (13) for permission | ||
| 1745 | + // errors when trying to remove directories without proper permissions. | ||
| 1746 | + #else | ||
| 1740 | 1747 | } else if (error == std::errc::permission_denied) { | |
| 1748 | + #endif | ||
| 1741 | 1749 | std::string message = "Permission denied: " + file_path_str; | |
| 1742 | 1750 | return env->ThrowErrnoException( | |
| 1743 | 1751 | permission_denied_error, "rm", message.c_str(), path_c_str); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments