Фикс отображения путей
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user