This commit is contained in:
jxxghp
2023-10-07 10:31:33 +08:00
parent a71a95892f
commit 47e1218fe0
2 changed files with 12 additions and 2 deletions

View File

@ -622,8 +622,9 @@ class TransferChain(ChainBase):
if not path.exists():
return
if path.is_file():
# 删除文件、nfo、jpg
files = glob.glob(f"{Path(path.parent).joinpath(path.stem)}*")
# 删除文件、nfo、jpg等同名文件
pattern = path.stem.replace('[', '?').replace(']', '?')
files = path.parent.glob(f"{pattern}.*")
for file in files:
Path(file).unlink()
logger.warn(f"文件 {path} 已删除")