system/acl: wrap libacl errors in PathError
All checks were successful
Test / Create distribution (push) Successful in 34s
Test / Sandbox (push) Successful in 1m47s
Test / Hakurei (push) Successful in 3m20s
Test / Hpkg (push) Successful in 3m49s
Test / Sandbox (race detector) (push) Successful in 5m48s
Test / Hakurei (race detector) (push) Successful in 3m9s
Test / Flake checks (push) Successful in 1m35s
All checks were successful
Test / Create distribution (push) Successful in 34s
Test / Sandbox (push) Successful in 1m47s
Test / Hakurei (push) Successful in 3m20s
Test / Hpkg (push) Successful in 3m49s
Test / Sandbox (race detector) (push) Successful in 5m48s
Test / Hakurei (race detector) (push) Successful in 3m9s
Test / Flake checks (push) Successful in 1m35s
This helps determine which libacl function the errno came from. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
@@ -29,8 +29,5 @@ func Update(name string, uid int, perms ...Perm) error {
|
||||
(*C.acl_perm_t)(p),
|
||||
C.size_t(len(perms)),
|
||||
)
|
||||
if r == 0 {
|
||||
return nil
|
||||
}
|
||||
return err
|
||||
return newAclPathError(name, int(r), err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user