From 3ce4b0bf23c96f9b6dce492889c128c7b026986c Mon Sep 17 00:00:00 2001 From: Matt Baer Date: Mon, 26 Jan 2015 00:05:53 -0500 Subject: [PATCH] Only output other-readable files --- code.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/code.go b/code.go index 092d548..475b81d 100644 --- a/code.go +++ b/code.go @@ -43,6 +43,13 @@ func findProjects() map[string]User { continue } + // Ensure file is other-readable + // TODO: just detect if we can actually read this, instead + info, _ := os.Stat(path) + if info.Mode() & 0004 == 0 { + continue + } + proj := &Project{Name: fname, Path: strings.Replace(path, "/home/", "~", -1)} u, exists := users[uname] if !exists {