Complete Trailing Slashes Fix
This commit is contained in:
parent
1cc0de75a6
commit
be17ee5a40
1 changed files with 4 additions and 4 deletions
8
main.go
8
main.go
|
@ -334,10 +334,10 @@ func (gf *GarageFile) readDirRoot(count int) ([]fs.FileInfo, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (gf *GarageFile) readDirChild(count int) ([]fs.FileInfo, error) {
|
func (gf *GarageFile) readDirChild(count int) ([]fs.FileInfo, error) {
|
||||||
prefix := gf.path.key
|
prefix := gf.path.key
|
||||||
if prefix[len(prefix)-1:] != "/" {
|
if len(prefix) > 0 && prefix[len(prefix)-1:] != "/" {
|
||||||
prefix = prefix + "/"
|
prefix = prefix + "/"
|
||||||
}
|
}
|
||||||
|
|
||||||
objs_info := gf.mc.ListObjects(gf.ctx, gf.path.bucket, minio.ListObjectsOptions{
|
objs_info := gf.mc.ListObjects(gf.ctx, gf.path.bucket, minio.ListObjectsOptions{
|
||||||
Prefix: prefix,
|
Prefix: prefix,
|
||||||
|
|
Loading…
Reference in a new issue