Handle invalid UTF-8 with replacement decoding

This commit is contained in:
jxxghp
2026-06-21 09:56:34 +08:00
parent 99e369aaa4
commit 68f18db374
29 changed files with 139 additions and 121 deletions
+1 -1
View File
@@ -597,7 +597,7 @@ class Rclone(StorageBase):
if not file_path or not Path(file_path).exists():
return None
# 读取rclone文件,检查是否有[MP]节点配置
with open(file_path, "r", encoding="utf-8") as f:
with open(file_path, "r", encoding="utf-8", errors="replace") as f:
lines = f.readlines()
if not lines:
return None