repos / pico

pico services - prose.sh, pastes.sh, imgs.sh, feeds.sh, pgs.sh
git clone https://github.com/picosh/pico.git

commit
83e0992
parent
29a356e
author
Eric Bower
date
2023-08-13 14:53:28 +0000 UTC
changes
1 files changed,  +3, -2
M shared/storage/minio.go
+3, -2
 1@@ -98,8 +98,9 @@ func (s *StorageMinio) GetBucketQuota(bucket Bucket) (uint64, error) {
 2 func (s *StorageMinio) ListFiles(bucket Bucket, dir string) ([]os.FileInfo, error) {
 3 	var fileList []os.FileInfo
 4 
 5-	opts := minio.ListObjectsOptions{Prefix: dir, Recursive: false}
 6-	for obj := range s.Client.ListObjects(context.TODO(), bucket.Name, opts) {
 7+	resolved := strings.TrimPrefix(dir, "/")
 8+	opts := minio.ListObjectsOptions{Prefix: resolved, Recursive: false}
 9+	for obj := range s.Client.ListObjects(context.Background(), bucket.Name, opts) {
10 		if obj.Err != nil {
11 			return fileList, obj.Err
12 		}