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:
parent
8c9c376e35
commit
3ce4b0bf23
7
code.go
7
code.go
@ -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 {
|
||||||
|
Loading…
Reference in New Issue
Block a user