There should be only One
This commit is contained in:
@@ -245,7 +245,7 @@ func (p *puller) fixupDirectories() {
|
||||
return nil
|
||||
}
|
||||
|
||||
if !permsEqual(cur.Flags, uint32(info.Mode())) {
|
||||
if !scanner.PermsEqual(cur.Flags, uint32(info.Mode())) {
|
||||
err := os.Chmod(path, os.FileMode(cur.Flags)&os.ModePerm)
|
||||
if err != nil {
|
||||
l.Warnln("Restoring folder flags: %q: %v", path, err)
|
||||
|
||||
@@ -109,15 +109,3 @@ func compareClusterConfig(local, remote protocol.ClusterConfigMessage) error {
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func permsEqual(a, b uint32) bool {
|
||||
switch runtime.GOOS {
|
||||
case "windows":
|
||||
// There is only writeable and read only, represented for user, group
|
||||
// and other equally. We only compare against user.
|
||||
return a&0600 == b&0600
|
||||
default:
|
||||
// All bits count
|
||||
return a&0777 == b&0777
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user