mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-19 09:14:27 +08:00
fix cannot access Alibaba Cloud OSS using minio object storage type (#230)
This commit is contained in:
@@ -95,10 +95,14 @@ func (s *MinIOObjectStorage) Delete(ctx core.Context, path string) error {
|
|||||||
func (s *MinIOObjectStorage) getFinalPath(path string) string {
|
func (s *MinIOObjectStorage) getFinalPath(path string) string {
|
||||||
rootPath := s.rootPath
|
rootPath := s.rootPath
|
||||||
|
|
||||||
if len(rootPath) < 1 || rootPath[len(rootPath)-1] != '/' {
|
if len(rootPath) > 0 && rootPath[len(rootPath)-1] != '/' {
|
||||||
rootPath = rootPath + "/"
|
rootPath = rootPath + "/"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if len(rootPath) > 0 && rootPath[0] == '/' {
|
||||||
|
rootPath = rootPath[1:]
|
||||||
|
}
|
||||||
|
|
||||||
if len(path) > 0 && path[0] == '/' {
|
if len(path) > 0 && path[0] == '/' {
|
||||||
path = path[1:]
|
path = path[1:]
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user