From 5edc0612ceba0527df9231959dc8af272047432e Mon Sep 17 00:00:00 2001 From: Alex Sharov Date: Thu, 2 Mar 2023 12:05:34 +0700 Subject: [PATCH] e3: close files (#912) --- state/locality_index.go | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/state/locality_index.go b/state/locality_index.go index 1b0ab3da6..62be22dc0 100644 --- a/state/locality_index.go +++ b/state/locality_index.go @@ -66,17 +66,16 @@ func NewLocalityIndex( return li, nil } func (li *LocalityIndex) closeWhatNotInList(fNames []string) { - if li == nil || li.file == nil || li.file.decompressor == nil { + if li == nil || li.bm == nil { return } for _, protectName := range fNames { - if li.file.decompressor.FileName() == protectName { - continue + if li.bm.FileName() == protectName { + return } - li.closeFiles() - break } + li.closeFiles() } func (li *LocalityIndex) OpenList(fNames []string) error {