mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-02 22:48:40 +00:00
Fix torrent info name not being utf-8 decoded when root file/folder name is blank
This commit is contained in:
parent
bc8cacdbd1
commit
3e67620e55
1 changed files with 1 additions and 1 deletions
|
@ -603,7 +603,7 @@ class Torrent:
|
||||||
if self.handle.has_metadata():
|
if self.handle.has_metadata():
|
||||||
name = self.torrent_info.file_at(0).path.split("/", 1)[0]
|
name = self.torrent_info.file_at(0).path.split("/", 1)[0]
|
||||||
if not name:
|
if not name:
|
||||||
return self.torrent_info.name()
|
name = self.torrent_info.name()
|
||||||
try:
|
try:
|
||||||
return name.decode("utf8", "ignore")
|
return name.decode("utf8", "ignore")
|
||||||
except UnicodeDecodeError:
|
except UnicodeDecodeError:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue