fix: 修复输出路径问题 — 路径解析改为基于应用目录而非CWD
当从外部目录(如D:\ccc)拖入文件时,输出文件会错误地写入源目录。 根因是所有路径使用相对路径 + os.getcwd() 解析,CWD不同则路径错误。 修复方案: - ConfigManager.get_path() 改为使用 app_root (exe所在目录/脚本所在目录) - 将 22 处裸硬编码 "data/result"/"data/output" 替换为 config.get_path() - 添加 result_folder 到默认配置和 config.ini - 修复 error_utils.py 中的路径匹配字符串 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
+2
-1
@@ -17,6 +17,7 @@ template_file = templates\银豹-采购单模板.xls
|
||||
processed_record = data/processed_files.json
|
||||
data_dir = data
|
||||
product_db = data/product_cache.db
|
||||
result_folder = data/result
|
||||
|
||||
[Performance]
|
||||
max_workers = 4
|
||||
@@ -33,7 +34,7 @@ purchase_order = 银豹-采购单模板.xls
|
||||
item_data = 商品资料.xlsx
|
||||
|
||||
[App]
|
||||
version = 2026.03.30.1036
|
||||
version = 2026.05.04.2128
|
||||
|
||||
[Gitea]
|
||||
base_url = https://gitea.94kan.cn
|
||||
|
||||
Reference in New Issue
Block a user