diff --git a/unrar.js b/unrar.js index 839cc3e..15273cd 100644 --- a/unrar.js +++ b/unrar.js @@ -858,10 +858,11 @@ var unrar = function(arrayBuffer) { // now we have all information but things are unpacked // TODO: unpack localFiles = localFiles.sort(function(a,b) { - // extract the number at the end of both filenames var aname = a.filename; var bname = b.filename; return aname > bname ? 1 : -1; + + // extract the number at the end of both filenames /* var aindex = aname.length, bindex = bname.length; diff --git a/untar.js b/untar.js index 3b16764..4eafbb3 100644 --- a/untar.js +++ b/untar.js @@ -132,7 +132,12 @@ var untar = function(arrayBuffer) { // got all local files, now sort them localFiles.sort(function(a,b) { + var aname = a.filename; + var bname = b.filename; + return aname > bname ? 1 : -1; + // extract the number at the end of both filenames + /* var aname = a.filename; var bname = b.filename; var aindex = aname.length, bindex = bname.length; @@ -149,6 +154,7 @@ var untar = function(arrayBuffer) { var anum = parseInt(aname.substr(aindex), 10), bnum = parseInt(bname.substr(bindex), 10); return anum - bnum; + */ }); // report # files and total length diff --git a/unzip.js b/unzip.js index 99e223d..1a65621 100644 --- a/unzip.js +++ b/unzip.js @@ -158,7 +158,12 @@ var unzip = function(arrayBuffer) { // got all local files, now sort them localFiles.sort(function(a,b) { + var aname = a.filename; + var bname = b.filename; + return aname > bname ? 1 : -1; + // extract the number at the end of both filenames + /* var aname = a.filename; var bname = b.filename; var aindex = aname.length, bindex = bname.length; @@ -175,6 +180,7 @@ var unzip = function(arrayBuffer) { var anum = parseInt(aname.substr(aindex), 10), bnum = parseInt(bname.substr(bindex), 10); return anum - bnum; + */ }); // archive extra data record