From f66b1f27b25de2ed027759f94c697e7ede7a6a5d Mon Sep 17 00:00:00 2001 From: ZHYCarge <40520292+ZHYCarge@users.noreply.github.com> Date: Mon, 26 Dec 2022 21:12:45 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E5=AD=98=E6=94=BE=E8=B7=AF=E5=BE=84=E7=9A=84=E6=8B=BC=E6=8E=A5?= =?UTF-8?q?=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix: 修改文件存放路径的拼接方式 --- storage.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/storage.py b/storage.py index 5fd4c05..a76a455 100644 --- a/storage.py +++ b/storage.py @@ -85,7 +85,7 @@ class FileSystemStorage: currpath = os.path.dirname(filepath) if os.listdir(currpath): 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): os.rmdir(os.path.abspath(currpath)) currpath = os.path.dirname(currpath)