Фикс отображения путей

This commit is contained in:
2026-06-14 19:09:50 +03:00
parent 5fb2f4df43
commit d4bf8a8cad
13 changed files with 178 additions and 18 deletions
+4 -3
View File
@@ -109,11 +109,12 @@ func (w *Worker) runRecognize(ctx context.Context, d store.Download) (recognize.
in.Files[i] = recognize.File{Path: f.Name, Size: f.Size}
}
savePath := translatePath(t.SavePath, w.cfg.PathMap)
res, err := w.recognizer.Recognize(ctx, in)
if err != nil {
return recognize.Result{}, t.SavePath, err
return recognize.Result{}, savePath, err
}
return res, t.SavePath, nil
return res, savePath, nil
}
// finishRecognition сохраняет попытку распознавания и двигает задачу. В Ф3
@@ -229,7 +230,7 @@ func (w *Worker) Apply(ctx context.Context, id int64) error {
}
w.transition(ctx, *d, store.StateLinking, "", "")
if err := w.linkPlan(ctx, d, plan, tag, t.SavePath); err != nil {
if err := w.linkPlan(ctx, d, plan, tag, translatePath(t.SavePath, w.cfg.PathMap)); err != nil {
return fmt.Errorf("apply: %w", err)
}
return nil