Fix file renaming for files that are not within a folder

This commit is contained in:
Andrew Resch 2008-10-14 19:09:50 +00:00
parent f8ad5ddb37
commit 4e79fe3f7d
1 changed files with 7 additions and 2 deletions

View File

@ -485,8 +485,13 @@ class FilesTab(Tab):
fp += self.treestore[i][0]
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)
client.rename_files(self.torrent_id, [(index, filepath)])