fix if statement in `cmd/torrent/main.go` (#349)

This commit is contained in:
D. HT. Yu 2019-12-08 17:34:24 +08:00 committed by Matt Joiner
parent f15aa27e24
commit 6e95274413
1 changed files with 3 additions and 1 deletions

View File

@ -100,7 +100,9 @@ func addTorrents(client *torrent.Client) error {
return nil, xerrors.Errorf("error loading torrent file %q: %s\n", arg, err) return nil, xerrors.Errorf("error loading torrent file %q: %s\n", arg, err)
} }
t, err := client.AddTorrent(metaInfo) t, err := client.AddTorrent(metaInfo)
if err != nil {
return nil, xerrors.Errorf("adding torrent: %w", err) return nil, xerrors.Errorf("adding torrent: %w", err)
}
return t, nil return t, nil
} }
}() }()