fixup: only set only_files if it was none

This commit is contained in:
pasta 2024-10-02 14:45:49 -05:00
parent db420f3a52
commit 57db99e9b8
No known key found for this signature in database
GPG key ID: E2F3D7916E722D38

View file

@ -886,7 +886,10 @@ impl Session {
.as_id20()
.context("magnet link didn't contain a BTv1 infohash")?;
if let Some(so) = magnet.get_select_only() {
opts.only_files = Some(so);
// Only overwrite opts.only_files if user didn't specify
if opts.only_files.is_none() {
opts.only_files = Some(so);
}
}
let peer_rx = self.make_peer_rx(