Don't set permissions 000 on directories with NoPermissionBits set (ref #284)

This commit is contained in:
Jakob Borg 2014-05-26 11:08:54 +02:00
parent c6ba0208d0
commit cfd1fdb38e

View File

@ -258,7 +258,7 @@ func (p *puller) fixupDirectories() {
return nil
}
if !scanner.PermsEqual(cur.Flags, uint32(info.Mode())) {
if !p.repoCfg.IgnorePerms && protocol.HasPermissionBits(cur.Flags) && !scanner.PermsEqual(cur.Flags, uint32(info.Mode())) {
err := os.Chmod(path, os.FileMode(cur.Flags)&os.ModePerm)
if err != nil {
l.Warnf("Restoring folder flags: %q: %v", path, err)