via "safcm fixperms".
`
+ // No permission checks on windows which doesn't track them.
+ windows := runtime.GOOS == "windows"
+
files := make(map[string]*safcm.File)
err := filepath.WalkDir(basePath, func(path string, d fs.DirEntry,
err error) error {
// permissions they could assume that these permissions are
// respected. This is not the case.
if typ == 0 /* regular file */ {
+ if windows {
+ perm = 0644
+ // 0755 must be set via permissions.yaml if
+ // windows is used
+ }
if perm != 0644 && perm != 0755 {
return fmt.Errorf(
"%q: invalid permissions %#o%s",
return err
}
} else if typ == fs.ModeDir {
+ if windows {
+ perm = 0755
+ }
if perm != 0755 {
return fmt.Errorf(
"%q: invalid permissions %#o%s",