Fix file renaming for files that are not within a folder
This commit is contained in:
parent
f8ad5ddb37
commit
4e79fe3f7d
|
@ -485,8 +485,13 @@ class FilesTab(Tab):
|
||||||
fp += self.treestore[i][0]
|
fp += self.treestore[i][0]
|
||||||
return fp
|
return fp
|
||||||
return fp
|
return fp
|
||||||
|
|
||||||
filepath = get_filepath(itr, str()) + new_text
|
# Only recurse if file is in a folder..
|
||||||
|
if self.treestore.iter_parent(itr):
|
||||||
|
filepath = get_filepath(itr, str()) + new_text
|
||||||
|
else:
|
||||||
|
filepath = new_text
|
||||||
|
|
||||||
log.debug("filepath: %s", filepath)
|
log.debug("filepath: %s", filepath)
|
||||||
|
|
||||||
client.rename_files(self.torrent_id, [(index, filepath)])
|
client.rename_files(self.torrent_id, [(index, filepath)])
|
||||||
|
|
Loading…
Reference in New Issue