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