| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 7682e7e commit e619adf
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1833,7 +1833,15 @@ static void RmSync(const FunctionCallbackInfo<Value>& args) { | |||
| 1833 | 1833 | } else if (error == std::errc::not_a_directory) { | |
| 1834 | 1834 | std::string message = "Not a directory: " + file_path_str; | |
| 1835 | 1835 | return env->ThrowErrnoException(ENOTDIR, "rm", message.c_str(), path_c_str); | |
| 1836 | + #ifdef _AIX | ||
| 1837 | + } else if (error == std::errc::permission_denied || | ||
| 1838 | + error == std::errc::file_exists) { | ||
| 1839 | + // Workaround for clang libc++ bug on AIX: std::filesystem::remove_all() | ||
| 1840 | + // incorrectly returns EEXIST (17) instead of EACCES (13) for permission | ||
| 1841 | + // errors when trying to remove directories without proper permissions. | ||
| 1842 | + #else | ||
| 1836 | 1843 | } else if (error == std::errc::permission_denied) { | |
| 1844 | + #endif | ||
| 1837 | 1845 | std::string message = "Permission denied: " + file_path_str; | |
| 1838 | 1846 | return env->ThrowErrnoException( | |
| 1839 | 1847 | permission_denied_error, "rm", message.c_str(), path_c_str); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments