From: Jordan Lee Date: Sun, 23 Sep 2012 17:21:19 +0000 (+0000) Subject: in file-row getPath(), don't leak 'path' into the global namespace X-Git-Tag: 2.70~12 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7b7da2d31592c49b9e028430a96d60af590a1540;p=transmission in file-row getPath(), don't leak 'path' into the global namespace --- diff --git a/web/javascript/file-row.js b/web/javascript/file-row.js index 1f6352c9e..fe2e9d5ea 100644 --- a/web/javascript/file-row.js +++ b/web/javascript/file-row.js @@ -174,10 +174,10 @@ function FileRow(torrent, i) }; this.getPath = function () { var file = torrent.getFile(i); - path = file.name.replace(/\/\/+/g,'/') - path = path.split('/').slice(0,-1) - path.push('t' + fields.torrent.getId() + 'f' + fields.index) - return path + var path = file.name.replace(/\/\/+/g,'/'); + path = path.split('/').slice(0,-1); + path.push('t' + fields.torrent.getId() + 'f' + fields.index); + return path; }; initialize(torrent, i); diff --git a/web/javascript/inspector.js b/web/javascript/inspector.js index b4e29e6ab..ef5c3adff 100644 --- a/web/javascript/inspector.js +++ b/web/javascript/inspector.js @@ -513,7 +513,7 @@ function Inspector(controller) { n = tor.getFileCount(); data.file_rows = []; fragment = document.createDocumentFragment(); - heirarchy = {'/':[]} + heirarchy = {'/':[]} for (i=0; i