From 0386be537b3e0e8097e30b0792589ad8b6819cba Mon Sep 17 00:00:00 2001 From: tjpcc Date: Mon, 9 Oct 2023 08:55:10 -0600 Subject: improves filetype detection --- contrib/fs/gopher.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'contrib/fs/gopher.go') 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)) -- cgit v1.2.3