fix #667 硬链接支持极空间

This commit is contained in:
jxxghp
2023-09-27 08:22:32 +08:00
parent cb93a63970
commit 1401ea74dd

View File

@ -61,7 +61,9 @@ class SystemUtils:
移动
"""
try:
# 当前目录改名
temp = src.replace(src.parent / dest.name)
# 移动到目标目录
shutil.move(temp, dest)
return 0, ""
except Exception as err:
@ -74,7 +76,11 @@ class SystemUtils:
硬链接
"""
try:
dest.hardlink_to(src)
# link到当前目录并改名
tmp_path = src.parent / dest.name
tmp_path.hardlink_to(src)
# 移动到目标目录
shutil.move(tmp_path, dest)
return 0, ""
except Exception as err:
print(str(err))