mirror of
https://git.deluge-torrent.org/deluge
synced 2025-09-19 16:18:32 +00:00
Fix torrent info name not being utf-8 decoded when root file/folder name is blank
This commit is contained in:
parent
f5409e0d0c
commit
afbeaa6b7d
2 changed files with 3 additions and 1 deletions
|
@ -6,6 +6,8 @@
|
|||
* Change share ratio calculation to use the total done instead of the all time
|
||||
downloaded value. This change will make the share ratio calculation not
|
||||
use data downloaded in failed hash checks.
|
||||
* Fix torrent info name not being utf-8 decoded when root file/folder name
|
||||
is blank
|
||||
|
||||
==== GtkUI ====
|
||||
* Fix #1104, #735 use path.utf-8 if available
|
||||
|
|
|
@ -603,7 +603,7 @@ class Torrent:
|
|||
if self.handle.has_metadata():
|
||||
name = self.torrent_info.file_at(0).path.split("/", 1)[0]
|
||||
if not name:
|
||||
return self.torrent_info.name()
|
||||
name = self.torrent_info.name()
|
||||
try:
|
||||
return name.decode("utf8", "ignore")
|
||||
except UnicodeDecodeError:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue