From fa1528277447723bf1beb0772596145a30ddd90d Mon Sep 17 00:00:00 2001 From: g1879 Date: Thu, 6 Aug 2020 23:21:18 +0800 Subject: [PATCH] =?UTF-8?q?avoid=5Fduplicate=5Fname=E5=87=BD=E6=95=B0?= =?UTF-8?q?=E4=B8=AD=E4=BD=BF=E7=94=A8=E7=BB=9D=E5=AF=B9=E8=B7=AF=E5=BE=84?= =?UTF-8?q?=EF=BC=8C=E4=BF=AE=E5=A4=8D=E8=B7=AF=E5=BE=84=E4=B8=BA.\?= =?UTF-8?q?=E6=97=B6=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DrissionPage/common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DrissionPage/common.py b/DrissionPage/common.py index e114a8f..b720917 100644 --- a/DrissionPage/common.py +++ b/DrissionPage/common.py @@ -171,7 +171,7 @@ def avoid_duplicate_name(folder_path: str, file_name: str) -> str: :param file_name: 要检查的文件名 :return: 可用的文件名 """ - file_Path = Path(folder_path).joinpath(file_name) + file_Path = Path(folder_path).absolute().joinpath(file_name) while file_Path.exists(): ext_name = file_Path.suffix base_name = file_Path.stem