From afc76861e06cefa9e0ee8a0058f4597aa5b5cbff Mon Sep 17 00:00:00 2001 From: Matt Joiner Date: Mon, 27 Jun 2016 15:46:27 +1000 Subject: [PATCH] Throw away Torrent display name when info becomes available --- torrent.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/torrent.go b/torrent.go index ac70a145..02350eed 100644 --- a/torrent.go +++ b/torrent.go @@ -96,6 +96,9 @@ type Torrent struct { } func (t *Torrent) setDisplayName(dn string) { + if t.haveInfo() { + return + } t.displayName = dn } @@ -223,6 +226,7 @@ func (t *Torrent) setInfoBytes(b []byte) error { } defer t.updateWantPeersEvent() t.info = ie + t.displayName = "" // Save a few bytes lol. t.cl.event.Broadcast() t.gotMetainfo.Set() t.storage, err = t.storageOpener.OpenTorrent(t.info) -- 2.50.0