diff --git a/pkg/storage/minio_storage.go b/pkg/storage/minio_storage.go index 073874a3..5fa36cc8 100644 --- a/pkg/storage/minio_storage.go +++ b/pkg/storage/minio_storage.go @@ -95,10 +95,14 @@ func (s *MinIOObjectStorage) Delete(ctx core.Context, path string) error { func (s *MinIOObjectStorage) getFinalPath(path string) string { rootPath := s.rootPath - if len(rootPath) < 1 || rootPath[len(rootPath)-1] != '/' { + if len(rootPath) > 0 && rootPath[len(rootPath)-1] != '/' { rootPath = rootPath + "/" } + if len(rootPath) > 0 && rootPath[0] == '/' { + rootPath = rootPath[1:] + } + if len(path) > 0 && path[0] == '/' { path = path[1:] }