schema: permissions on symlinks are irrelevant

This commit is contained in:
Brad Fitzpatrick 2011-02-03 08:19:40 -08:00
parent 8b8f462f6a
commit d81d6211d5
1 changed files with 3 additions and 1 deletions

View File

@ -138,7 +138,9 @@ func NewCommonFileMap(fileName string, fi *os.FileInfo) map[string]interface{} {
}
// Common elements (from file-common.txt)
m["unixPermission"] = fmt.Sprintf("0%o", fi.Permission())
if !fi.IsSymlink() {
m["unixPermission"] = fmt.Sprintf("0%o", fi.Permission())
}
if fi.Uid != -1 {
m["unixOwnerId"] = fi.Uid
if user := getUserFromUid(fi.Uid); user != "" {