From 03227bf461c017cd5b2bb63b540215e61c22e944 Mon Sep 17 00:00:00 2001 From: Matt Joiner Date: Wed, 4 Jan 2017 18:09:17 +1100 Subject: [PATCH] metainfo: FileInfo.Offset failed with single-file torrents --- metainfo/fileinfo.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/metainfo/fileinfo.go b/metainfo/fileinfo.go index ff2d5631..4b72d12d 100644 --- a/metainfo/fileinfo.go +++ b/metainfo/fileinfo.go @@ -17,7 +17,7 @@ func (fi *FileInfo) DisplayPath(info *Info) string { } func (me FileInfo) Offset(info *Info) (ret int64) { - for _, fi := range info.Files { + for _, fi := range info.UpvertedFiles() { if me.DisplayPath(info) == fi.DisplayPath(info) { return } -- 2.48.1