mirror of
https://tildegit.org/solderpunk/molly-brown
synced 2024-05-12 16:06:03 +02:00
Only list world readable files.
This commit is contained in:
parent
23a6284cc4
commit
0de58e031a
|
@ -156,6 +156,10 @@ func generateDirectoryListing(path string) string {
|
|||
}
|
||||
listing = "# Directory listing\n\n"
|
||||
for _, file := range files {
|
||||
// Only list world readable files
|
||||
if uint64(file.Mode().Perm())&0444 != 0444 {
|
||||
continue
|
||||
}
|
||||
listing += fmt.Sprintf("=> %s %s\n", file.Name(), file.Name())
|
||||
}
|
||||
return listing
|
||||
|
|
Loading…
Reference in New Issue