mirror of
https://github.com/langgenius/dify.git
synced 2024-11-16 11:42:29 +08:00
chore: use posixpath to wrapper filepath (#9976)
This commit is contained in:
parent
0b16270b88
commit
dd5ffaf058
|
@ -1,3 +1,4 @@
|
|||
import posixpath
|
||||
from collections.abc import Generator
|
||||
|
||||
import oss2 as aliyun_s3
|
||||
|
@ -50,9 +51,4 @@ class AliyunOssStorage(BaseStorage):
|
|||
self.client.delete_object(self.__wrapper_folder_filename(filename))
|
||||
|
||||
def __wrapper_folder_filename(self, filename) -> str:
|
||||
if self.folder:
|
||||
if self.folder.endswith("/"):
|
||||
filename = self.folder + filename
|
||||
else:
|
||||
filename = self.folder + "/" + filename
|
||||
return filename
|
||||
return posixpath.join(self.folder, filename) if self.folder else filename
|
||||
|
|
Loading…
Reference in New Issue
Block a user