Comments in banned torrent list

This commit is contained in:
Matt Joiner 2015-03-18 18:35:52 +11:00
parent a451bc7e6d
commit c413ed7963
1 changed files with 3 additions and 0 deletions

View File

@ -458,6 +458,9 @@ func (cl *Client) initBannedTorrents() error {
scanner := bufio.NewScanner(f)
cl.bannedTorrents = make(map[InfoHash]struct{})
for scanner.Scan() {
if strings.HasPrefix(strings.TrimSpace(scanner.Text()), "#") {
continue
}
var ihs string
n, err := fmt.Sscanf(scanner.Text(), "%x", &ihs)
if err != nil {