downloader: whitelist only .seg.torrent files. (#8729)

This commit is contained in:
Alex Sharov 2023-11-15 11:23:57 +07:00 committed by GitHub
parent 957a94e551
commit 9a9db2d90b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -227,12 +227,10 @@ func (d *WebSeeds) downloadTorrentFilesFromProviders(ctx context.Context, rootDi
continue
}
addedNew++
if strings.HasSuffix(name, ".v.torrent") || strings.HasSuffix(name, ".ef.torrent") {
if !strings.HasSuffix(name, ".seg.torrent") {
_, fName := filepath.Split(name)
if strings.HasPrefix(fName, "commitment") {
d.logger.Log(d.verbosity, "[snapshots] webseed has .torrent, but we skip it because we don't support it yet", "name", name)
continue
}
d.logger.Log(d.verbosity, "[snapshots] webseed has .torrent, but we skip it because this type not supported yet", "name", fName)
continue
}
name := name
tUrls := tUrls