fix: 修复文件路径检查日志,确保输出绝对路径
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user