Changeset 12791


Ignore:
Timestamp:
Aug 29, 2011, 9:07:50 PM (10 years ago)
Author:
jordan
Message:

#4452 'Error: file.name is undefined' at file-row.js line 113 -- fixed.

Location:
trunk/web/javascript
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/web/javascript/file-row.js

    r12785 r12791  
    111111                var me = this,
    112112                    file = torrent.getFile(i),
    113                     name = file.name.substring (file.name.lastIndexOf('/')+1),
    114                     root, wanted_div, pri_div, file_div, prog_div;
     113                    name, root, wanted_div, pri_div, file_div, prog_div;
    115114
    116115                root = document.createElement('li');
     
    146145                });
    147146
     147                name = file.name || 'Unknown';
     148                name = name.substring(name.lastIndexOf('/')+1);
     149                name = name.replace(/([\/_\.])/g, "$1​");
    148150                file_div = document.createElement('div');
    149151                file_div.className = "inspector_torrent_file_list_entry_name";
    150                 file_div.innerHTML = name.replace(/([\/_\.])/g, "$1​");
     152                file_div.innerHTML = name;
    151153
    152154                prog_div = document.createElement('div');
  • trunk/web/javascript/transmission.js

    r12790 r12791  
    16501650                }
    16511651
    1652                 var torrent = sel[0];
    1653                 if (torrent === this._files_torrent)
    1654                         if(torrent.getFileCount() === (this._files ? this._files.length: 0))
    1655                                 return;
    1656 
    16571652                // build the file list
    16581653                this.clearFileList();
Note: See TracChangeset for help on using the changeset viewer.