jim800121chen
aa324cef42
fix(local-tool): flash 模型檔案找不到 — 相對路徑未解析
根因:models.json 的 filePath 是相對路徑("data/nef/kl520/xxx.nef"),
但 server working directory 是 {app}\bin\(app.go 設 cmd.Dir = binary 目錄),
所以 server 在 {app}\bin\data\nef\ 找 .nef 檔,找不到。
實際位置:{app}\data\nef\(installer 裝的位置),對應 server 的 --data-dir
由 Wails app 傳入的 %APPDATA%\visiona-local(或 fallback 到 <exe>/../data)。
修法:
- flash.NewService 新增 dataDir 參數
- StartFlash 中把相對 filePath 用 dataDir 拼接成絕對路徑:
"data/nef/..." → 去掉 "data/" 前綴 → dataDir + "/nef/..."
- main.go 傳 dataDir 給 flash.NewService
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 22:03:28 +08:00
..
2026-04-12 20:16:24 +08:00
2026-04-11 22:10:38 +08:00
2026-04-11 22:10:38 +08:00
2026-04-11 22:10:38 +08:00
2026-04-11 22:10:38 +08:00
2026-04-12 04:59:23 +08:00
2026-04-12 22:03:28 +08:00
2026-04-11 22:10:38 +08:00
2026-04-11 22:10:38 +08:00