From: Matt Joiner Date: Mon, 16 May 2016 09:50:46 +0000 (+1000) Subject: Don't log missing files during hashing X-Git-Tag: v1.0.0~724 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=6f470a2d02f6e5ddc7e688cb7c0e56943f03fa57;p=btrtrc.git Don't log missing files during hashing --- diff --git a/torrent.go b/torrent.go index 7d027fae..296db4be 100644 --- a/torrent.go +++ b/torrent.go @@ -9,6 +9,7 @@ import ( "math" "math/rand" "net" + "os" "sort" "sync" "time" @@ -626,7 +627,7 @@ func (t *Torrent) hashPiece(piece int) (ret metainfo.Hash) { missinggo.CopyExact(&ret, hash.Sum(nil)) return } - if err != io.ErrUnexpectedEOF { + if err != io.ErrUnexpectedEOF && !os.IsNotExist(err) { log.Printf("unexpected error hashing piece with %T: %s", t.storage, err) } return