mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-11 02:48:39 +00:00
Fix Gtk addtorrentdialog parent None error for single file torrents
This commit is contained in:
parent
637578375c
commit
61bd8aa154
1 changed files with 4 additions and 3 deletions
|
@ -884,9 +884,10 @@ class AddTorrentDialog(component.Component):
|
||||||
parent = self.files_treestore.iter_parent(itr)
|
parent = self.files_treestore.iter_parent(itr)
|
||||||
file_path = os.path.join(self.get_file_path(parent), new_text)
|
file_path = os.path.join(self.get_file_path(parent), new_text)
|
||||||
# Don't rename if filename exists
|
# Don't rename if filename exists
|
||||||
for row in self.files_treestore[parent].iterchildren():
|
if parent:
|
||||||
if new_text == row[1]:
|
for row in self.files_treestore[parent].iterchildren():
|
||||||
return
|
if new_text == row[1]:
|
||||||
|
return
|
||||||
if os.path.sep in new_text:
|
if os.path.sep in new_text:
|
||||||
# There are folders in this path, so we need to create them
|
# There are folders in this path, so we need to create them
|
||||||
# and then move the file iter to top
|
# and then move the file iter to top
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue