diff options
Diffstat (limited to 'modules/storage/minio.go')
-rw-r--r-- | modules/storage/minio.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/storage/minio.go b/modules/storage/minio.go index 724445c0ab..f78ba6aa27 100644 --- a/modules/storage/minio.go +++ b/modules/storage/minio.go @@ -151,7 +151,7 @@ type minioFileInfo struct { } func (m minioFileInfo) Name() string { - return m.ObjectInfo.Key + return path.Base(m.ObjectInfo.Key) } func (m minioFileInfo) Size() int64 { @@ -219,7 +219,7 @@ func (m *MinioStorage) IterateObjects(fn func(path string, obj Object) error) er } if err := func(object *minio.Object, fn func(path string, obj Object) error) error { defer object.Close() - return fn(strings.TrimPrefix(m.basePath, mObjInfo.Key), &minioObject{object}) + return fn(strings.TrimPrefix(mObjInfo.Key, m.basePath), &minioObject{object}) }(object, fn); err != nil { return convertMinioErr(err) } |