From 19c6e7dd7bfc7d68c9460ef816f9eabff0653b5a Mon Sep 17 00:00:00 2001 From: Simon Ding Date: Wed, 11 Jun 2025 15:47:37 +0800 Subject: [PATCH] fix: not default path --- pkg/qbittorrent/qbittorrent.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/qbittorrent/qbittorrent.go b/pkg/qbittorrent/qbittorrent.go index 1023153..56151b4 100644 --- a/pkg/qbittorrent/qbittorrent.go +++ b/pkg/qbittorrent/qbittorrent.go @@ -240,7 +240,7 @@ func (t *Torrent) WalkFunc() func(fn func(path string, info fs.FileInfo) error) return err } } - path, err := t.c.DefaultSavePath() + t1, err := t.getTorrent() if err != nil { return func(fn func(path string, info fs.FileInfo) error) error { return err @@ -249,7 +249,7 @@ func (t *Torrent) WalkFunc() func(fn func(path string, info fs.FileInfo) error) return func(fn func(path string, info fs.FileInfo) error) error { for _, file := range files { - name := filepath.Join(path, file.Name) + name := filepath.Join(t1.SavePath, file.Name) info, err := os.Stat(name) if err != nil { return err