Ticket #1112: add-torrent-dialog-fix-renames.patch

File add-torrent-dialog-fix-renames.patch, 1.2 KB (added by Ideal, 14 years ago)
  • deluge/ui/gtkui/addtorrentdialog.py

     
    836836 
    837837                    index = self.files_treestore[row][3] 
    838838 
    839                     # Don't do anything if this is a folder 
    840                     if index == -1: 
    841                         return 
     839                    # Process only files 
     840                    if index > -1: 
     841                        # Get the new full path for this file 
     842                        file_path = file_path_base + self.files_treestore[row][1] 
     843     
     844                        # Update the file path in the mapped_files dict 
     845                        self.options[torrent_id]["mapped_files"][index] = file_path 
    842846 
    843                     # Get the new full path for this file 
    844                     file_path = file_path_base + self.files_treestore[row][1] 
    845  
    846                     # Update the file path in the mapped_files dict 
    847                     self.options[torrent_id]["mapped_files"][index] = file_path 
    848  
    849847                    # Get the next siblings iter 
    850848                    row = self.files_treestore.iter_next(row) 
    851849