From b06cd97110972b4b25cb9890c2e3217c391456eb Mon Sep 17 00:00:00 2001 From: YouROK <8yourok8@mail.ru> Date: Tue, 1 Jun 2021 23:05:53 +0300 Subject: [PATCH] revert delete on drop --- server/torr/storage/torrstor/cache.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/server/torr/storage/torrstor/cache.go b/server/torr/storage/torrstor/cache.go index c82d01c..3824c5a 100644 --- a/server/torr/storage/torrstor/cache.go +++ b/server/torr/storage/torrstor/cache.go @@ -90,11 +90,11 @@ func (c *Cache) Piece(m metainfo.Piece) storage.PieceImpl { func (c *Cache) Close() error { log.TLogln("Close cache for:", c.hash) delete(c.storage.caches, c.hash) - for _, v := range c.pieces { - if v.dPiece != nil { - os.Remove(v.dPiece.name) - } - } + //for _, v := range c.pieces { + // if v.dPiece != nil { + // os.Remove(v.dPiece.name) + // } + //} c.pieces = nil c.muReaders.Lock()