Don't list dot files.

This commit is contained in:
Solderpunk 2019-11-22 21:35:51 +02:00
parent 0de58e031a
commit a67d1b113a
1 changed files with 4 additions and 0 deletions

View File

@ -156,6 +156,10 @@ func generateDirectoryListing(path string) string {
}
listing = "# Directory listing\n\n"
for _, file := range files {
// Skip dotfiles
if strings.HasPrefix(file.Name(), ".") {
continue
}
// Only list world readable files
if uint64(file.Mode().Perm())&0444 != 0444 {
continue