fix cannot access Alibaba Cloud OSS using minio object storage type (#230)

This commit is contained in:
MaysWind
2025-12-02 23:27:24 +08:00
parent 3daff44155
commit 79842d9171
+5 -1
View File
@@ -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:]
}