e3: close files (#912)

This commit is contained in:
Alex Sharov 2023-03-02 12:05:34 +07:00 committed by GitHub
parent 18a0f2bafa
commit 5edc0612ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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
}
}
func (li *LocalityIndex) OpenList(fNames []string) error {