fix: 修改文件存放路径的拼接方式
fix: 修改文件存放路径的拼接方式
This commit is contained in:
+1
-1
@@ -85,7 +85,7 @@ class FileSystemStorage:
|
|||||||
currpath = os.path.dirname(filepath)
|
currpath = os.path.dirname(filepath)
|
||||||
if os.listdir(currpath):
|
if os.listdir(currpath):
|
||||||
return
|
return
|
||||||
while str(currpath) != (str(self.DATA_ROOT) + '\\upload'):
|
while str(currpath) != (str(os.path.join(self.DATA_ROOT, 'upload'))):
|
||||||
if not os.listdir(currpath):
|
if not os.listdir(currpath):
|
||||||
os.rmdir(os.path.abspath(currpath))
|
os.rmdir(os.path.abspath(currpath))
|
||||||
currpath = os.path.dirname(currpath)
|
currpath = os.path.dirname(currpath)
|
||||||
|
|||||||
Reference in New Issue
Block a user