Skip to content

Commit

Permalink
downloader: dont delete torrent files (#9663)
Browse files Browse the repository at this point in the history
this code did delete .idx files also
  • Loading branch information
AskAlexSharov authored Mar 11, 2024
1 parent a8958b6 commit 4d771dc
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions erigon-lib/downloader/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,13 +178,7 @@ func BuildTorrentFilesIfNeed(ctx context.Context, dirs datadir.Dirs, torrentFile
for _, file := range files {
file := file

if item, ok := ignore.Get(file); ok {
ts, _ := torrentFiles.LoadByPath(filepath.Join(dirs.Snap, file))

if ts == nil || item.Hash != ts.InfoHash.AsString() {
torrentFiles.Delete(file)
}

if ignore.Contains(file) {
i.Add(1)
continue
}
Expand Down

0 comments on commit 4d771dc

Please sign in to comment.