Commit a66e268

Eric Bower  ·  2025-12-15 23:03:51 -0500 EST
parent 780f9e1
fix(pgs): gen dir listing close object
1 files changed,  +6, -2
+6, -2
......@@ -100,8 +100,12 @@ func shouldGenerateListing(st sst.ObjectStorage, bucket sst.Bucket, projectDir s
100100 }
101101
102102 indexPath := dirPath + "index.html"
103- _, _, err = st.GetObject(bucket, indexPath)
104- return err != nil
103+ obj, _, err := st.GetObject(bucket, indexPath)
104+ if err != nil {
105+ return true
106+ }
107+ _ = obj.Close()
108+ return false
105109 }
106110
107111 func generateDirectoryHTML(path string, entries []os.FileInfo) string {