From d81d6211d57135b5ec2847dbd317e27631ff01d7 Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Thu, 3 Feb 2011 08:19:40 -0800 Subject: [PATCH] schema: permissions on symlinks are irrelevant --- lib/go/schema/schema.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/go/schema/schema.go b/lib/go/schema/schema.go index a99c2ebc2..68c2e7335 100644 --- a/lib/go/schema/schema.go +++ b/lib/go/schema/schema.go @@ -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 != "" {