// Config: parse permissions.yaml
-// Copyright (C) 2021 Simon Ruderich
+// Copyright (C) 2021-2022 Simon Ruderich
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
"(expected e.g. %q or %q)",
path, xs[0], "0644", "01777")
}
- if perm > 07777 {
+ if perm < 0 || perm > 07777 {
return fmt.Errorf("%s: invalid permission %#o "+
"(expected e.g. %#o or %#o)",
path, perm, 0644, 01777)