os: return .Permission_Denied for .EACCES in posix and linux

This commit is contained in:
IllusionMan1212
2026-03-03 17:50:31 +02:00
parent b80ffe6ad7
commit afbb0b4357
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