Skip to content

Commit

Permalink
Remove unnecessary check if the torrent file exists
Browse files Browse the repository at this point in the history
The torrent library handles it for us.
  • Loading branch information
Sioro-Neoku committed Jul 7, 2016
1 parent 8d441bb commit 3cd7e91
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,6 @@ func NewClient(torrentPath string, port int, seed bool, tcp bool, maxConnections
}
}

// Check if the file exists.
if _, err = os.Stat(torrentPath); err != nil {
return client, ClientError{Type: "file not found", Origin: err}
}

if t, err = c.AddTorrentFromFile(torrentPath); err != nil {
return client, ClientError{Type: "adding torrent to the client", Origin: err}
}
Expand Down

0 comments on commit 3cd7e91

Please sign in to comment.