If I want to call chmodSyncRecursive(dir, 0644), then that directory and all subdirectories become unlistable because directories must have execute permissions. chmodSyncRecursive (and maybe other similar functions) should take a third optional argument for dirmode (second arg being filemode) that is used specifically for directories (and defaults to filemode).
If I want to call chmodSyncRecursive(dir, 0644), then that directory and all subdirectories become unlistable because directories must have execute permissions. chmodSyncRecursive (and maybe other similar functions) should take a third optional argument for dirmode (second arg being filemode) that is used specifically for directories (and defaults to filemode).