mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-04 15:38:43 +00:00
Fix torrent name being blank when root folder is renamed to /
Update changelog (for previous commit as well)
This commit is contained in:
parent
888997372c
commit
6d2d3c0fd0
1 changed files with 2 additions and 0 deletions
|
@ -608,6 +608,8 @@ class Torrent:
|
||||||
def ti_name():
|
def ti_name():
|
||||||
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:
|
||||||
|
return 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