repos / pico

pico services mono repo
git clone https://github.com/picosh/pico.git

commit
a66e268
parent
780f9e1
author
Eric Bower
date
2025-12-15 23:03:51 -0500 EST
fix(pgs): gen dir listing close object
1 files changed,  +6, -2
M pkg/apps/pgs/gen_dir_listing.go
+6, -2
 1@@ -100,8 +100,12 @@ func shouldGenerateListing(st sst.ObjectStorage, bucket sst.Bucket, projectDir s
 2 	}
 3 
 4 	indexPath := dirPath + "index.html"
 5-	_, _, err = st.GetObject(bucket, indexPath)
 6-	return err != nil
 7+	obj, _, err := st.GetObject(bucket, indexPath)
 8+	if err != nil {
 9+		return true
10+	}
11+	_ = obj.Close()
12+	return false
13 }
14 
15 func generateDirectoryHTML(path string, entries []os.FileInfo) string {