From 459c8d37912d3e5af9ec60d5d1bcf6eff11a0112 Mon Sep 17 00:00:00 2001 From: Yat Ho Date: Fri, 24 May 2024 23:08:33 +0800 Subject: [PATCH] fix: escape single file torrent name (#6846) --- libtransmission/torrent-metainfo.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libtransmission/torrent-metainfo.cc b/libtransmission/torrent-metainfo.cc index 9ad4cf99e..fcec94f51 100644 --- a/libtransmission/torrent-metainfo.cc +++ b/libtransmission/torrent-metainfo.cc @@ -522,7 +522,7 @@ private: // In the single file case, length maps to the length of the file in bytes. if (tm_.file_count() == 0 && length_ != 0 && !std::empty(tm_.name_)) { - tm_.files_.add(tm_.name_, length_); + tm_.files_.add(tr_torrent_files::makeSubpathPortable(tm_.name_), length_); } if (auto const has_metainfo = tm_.info_dict_size() != 0U; has_metainfo)