1
0
Fork 0
mirror of https://github.com/codedread/bitjs synced 2025-10-04 18:19:15 +02:00

Go back to not doing anything fancy with sorting files in archives

This commit is contained in:
codedread 2014-06-12 01:47:06 -05:00
parent de1bc5243c
commit e21f7cc244
3 changed files with 14 additions and 1 deletions

View file

@ -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;

View file

@ -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

View file

@ -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