summaryrefslogtreecommitdiff
path: root/contrib/fs
diff options
context:
space:
mode:
authortjpcc <tjp@ctrl-c.club>2023-01-18 22:10:29 -0700
committertjpcc <tjp@ctrl-c.club>2023-01-18 22:10:29 -0700
commitf569df6eade1373dee7116ceac977636bdfc8edc (patch)
tree11cb486062fbbf5356bb0f7ca749af89ae3754ae /contrib/fs
parent6586db782ea6dcb5f2eb191a690ec7e7df51161f (diff)
bugfix and some docs cleanup
Diffstat (limited to 'contrib/fs')
-rw-r--r--contrib/fs/dir.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/fs/dir.go b/contrib/fs/dir.go
index 6292f67..4328c8f 100644
--- a/contrib/fs/dir.go
+++ b/contrib/fs/dir.go
@@ -75,7 +75,7 @@ func DirectoryDefault(fileSystem fs.FS, fileNames ...string) gus.Handler {
func DirectoryListing(fileSystem fs.FS, template *template.Template) gus.Handler {
return func(ctx context.Context, req *gus.Request) *gus.Response {
path, dirFile, resp := handleDir(req, fileSystem)
- if resp != nil {
+ if dirFile == nil {
return resp
}
defer dirFile.Close()