diff options
author | tjpcc <tjp@ctrl-c.club> | 2023-10-09 08:55:10 -0600 |
---|---|---|
committer | tjpcc <tjp@ctrl-c.club> | 2023-10-09 08:55:10 -0600 |
commit | 0386be537b3e0e8097e30b0792589ad8b6819cba (patch) | |
tree | 5d1d9259bb02b942b7b4a6d3da58de3f5f2d90f0 /contrib/fs/gopher.go | |
parent | 775c0c1040e6a6622fec39d49b354bfa194a6998 (diff) |
improves filetype detection
Diffstat (limited to 'contrib/fs/gopher.go')
-rw-r--r-- | contrib/fs/gopher.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/contrib/fs/gopher.go b/contrib/fs/gopher.go index db21227..0a0b482 100644 --- a/contrib/fs/gopher.go +++ b/contrib/fs/gopher.go @@ -185,7 +185,8 @@ func isFile(path string) (bool, error) { } func isMap(path string, settings gophermap.FileSystemSettings) bool { - if strings.HasSuffix(path, ".gophermap") { + base := filepath.Base(path) + if base == "gophermap" || strings.HasSuffix(base, ".gph") || strings.HasSuffix(base, ".gophermap") { return true } return slices.Contains(settings.DirMaps, filepath.Base(path)) |