From 4a914852ccf99c8bab4181aaa93803b365f301db Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Fri, 3 Jun 2011 08:48:33 +0000 Subject: [PATCH] support torrents whose name is empty --- ChangeLog | 1 + src/torrent_info.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/ChangeLog b/ChangeLog index 0daa3133c..3f288c28d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -87,6 +87,7 @@ incoming connection * added more detailed instrumentation of the disk I/O thread + * support torrents whose name is empty * fixed connection limit to take web seeds into account as well * fixed bug when receiving a have message before having the metadata * fixed python bindings build with disabled DHT support diff --git a/src/torrent_info.cpp b/src/torrent_info.cpp index 93fdc5e2e..7c7c40788 100644 --- a/src/torrent_info.cpp +++ b/src/torrent_info.cpp @@ -788,6 +788,7 @@ namespace libtorrent } std::string name = name_ent->string_value(); + if (name.empty()) name = to_hex(m_info_hash.to_string()); name = sanitize_path(name); if (!valid_path_element(name))