fix #810
This commit is contained in:
parent
333d187615
commit
e7e9ca539d
@ -45,7 +45,8 @@ class FileTransferModule(_ModuleBase):
|
|||||||
# 获取目标路径
|
# 获取目标路径
|
||||||
if not target:
|
if not target:
|
||||||
target = self.get_target_path(in_path=path)
|
target = self.get_target_path(in_path=path)
|
||||||
else:
|
elif not target.exists() or target.is_file():
|
||||||
|
# 目的路径不存在或者是文件时,找对应的媒体库目录
|
||||||
target = self.get_library_path(target)
|
target = self.get_library_path(target)
|
||||||
if not target:
|
if not target:
|
||||||
logger.error("未找到媒体库目录,无法转移文件")
|
logger.error("未找到媒体库目录,无法转移文件")
|
||||||
@ -575,7 +576,7 @@ class FileTransferModule(_ModuleBase):
|
|||||||
@staticmethod
|
@staticmethod
|
||||||
def get_library_path(path: Path):
|
def get_library_path(path: Path):
|
||||||
"""
|
"""
|
||||||
根据目录查询其所在的媒体库目录,查询不到的返回输入目录
|
根据文件路径查询其所在的媒体库目录,查询不到的返回输入目录
|
||||||
"""
|
"""
|
||||||
if not path:
|
if not path:
|
||||||
return None
|
return None
|
||||||
|
Loading…
x
Reference in New Issue
Block a user