mirror of
https://github.com/simon-ding/polaris.git
synced 2026-06-08 02:57:38 +08:00
fix: panic when torrent not exist
This commit is contained in:
@@ -257,7 +257,11 @@ func (c *Client) findEpisodeFilesPreMoving(historyId int) error {
|
||||
isSingleEpisode := his.EpisodeID > 0
|
||||
downloadDir := c.db.GetDownloadDir()
|
||||
task := c.tasks[historyId]
|
||||
target := filepath.Join(downloadDir, task.Name())
|
||||
name, err := task.Name()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
target := filepath.Join(downloadDir, name)
|
||||
fi, err := os.Stat(target)
|
||||
if err != nil {
|
||||
return errors.Wrapf(err, "read dir %v", target)
|
||||
|
||||
Reference in New Issue
Block a user