From a69b0b4ead73b2e1553958da197f6db00dfdaa85 Mon Sep 17 00:00:00 2001 From: akuma06 Date: Sat, 22 Jul 2017 01:55:23 +0200 Subject: [PATCH] Fix issue with torrent magnet --- utils/upload/upload.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/upload/upload.go b/utils/upload/upload.go index 59d81df5..6d5a5b28 100644 --- a/utils/upload/upload.go +++ b/utils/upload/upload.go @@ -135,7 +135,7 @@ func ExtractInfo(c *gin.Context, r *torrentValidator.TorrentRequest) error { } // after data has been checked & extracted, write it to disk - if len(config.Get().Torrents.FileStorage) > 0 { + if len(config.Get().Torrents.FileStorage) > 0 && r.Filesize > 0 { err := writeTorrentToDisk(tfile, r.Infohash+".torrent", &r.Filepath) if err != nil { return err