From bfbd93b912a1779307526ed0699270032835cefd Mon Sep 17 00:00:00 2001 From: jxxghp Date: Thu, 12 Oct 2023 20:35:44 +0800 Subject: [PATCH] fix --- app/utils/system.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/utils/system.py b/app/utils/system.py index f6d6c957..6da65e31 100644 --- a/app/utils/system.py +++ b/app/utils/system.py @@ -99,6 +99,8 @@ class SystemUtils: try: # link到当前目录并改名 tmp_path = src.parent / (dest.name + ".mp") + if tmp_path.exists(): + tmp_path.unlink() tmp_path.hardlink_to(src) # 移动到目标目录 shutil.move(tmp_path, dest)