fix: 修复文件路径检查日志,确保输出绝对路径

This commit is contained in:
2025-04-11 23:09:58 +08:00
parent 896d085e8d
commit e01dadbdec
2 changed files with 9 additions and 10 deletions

View File

@@ -49,14 +49,13 @@ def process_item(item):
os.makedirs(os.path.dirname(abs_file_path), exist_ok=True)
updated = False
logging.info(f"📝 检查 {abs_file_path} 是否需要更新")
if os.path.exists(abs_file_path):
with open(abs_file_path, "r", encoding="utf-8") as f:
old_content = f.read()
if old_content != new_content:
updated = True
else:
logging.warning(f"⚠️ 文件 {file_path} 不存在,将创建。")
logging.warning(f"⚠️ 文件 {abs_file_path} 不存在,将创建。")
updated = True
if updated: