1
0
mirror of https://github.com/thebaer/tildes.git synced 2018-07-20 07:15:21 +00:00

Only output other-readable files

This commit is contained in:
Matt Baer 2015-01-26 00:05:53 -05:00
parent 8c9c376e35
commit 3ce4b0bf23

View File

@ -43,6 +43,13 @@ func findProjects() map[string]User {
continue 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)} proj := &Project{Name: fname, Path: strings.Replace(path, "/home/", "~", -1)}
u, exists := users[uname] u, exists := users[uname]
if !exists { if !exists {