Merge pull request #6364 from IllusionMan1212/eacces-perm-denied

os: return `.Permission_Denied` for `.EACCES` in posix and linux
This commit is contained in:
Jeroen van Rijn
2026-03-03 17:11:55 +01:00
committed by GitHub
2 changed files with 2 additions and 2 deletions

View File

@@ -148,7 +148,7 @@ _get_platform_error :: proc(errno: linux.Errno) -> Error {
#partial switch errno {
case .NONE:
return nil
case .EPERM:
case .EPERM, .EACCES:
return .Permission_Denied
case .EEXIST:
return .Exist

View File

@@ -16,7 +16,7 @@ _get_platform_error_from_errno :: proc() -> Error {
_get_platform_error_existing :: proc(errno: posix.Errno) -> Error {
#partial switch errno {
case .EPERM:
case .EPERM, .EACCES:
return .Permission_Denied
case .EEXIST:
return .Exist