mirror of
https://tildegit.org/solderpunk/molly-brown.git
synced 2025-04-13 09:29:46 +00:00
Only list world readable files.
This commit is contained in:
parent
23a6284cc4
commit
0de58e031a
1 changed files with 4 additions and 0 deletions
|
@ -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…
Add table
Reference in a new issue