jshint niggles

This commit is contained in:
SheetJS 2013-10-27 13:13:02 -07:00
parent 82335b172a
commit 369f05ae0f
2 changed files with 8 additions and 5 deletions

@ -1,7 +1,10 @@
.PHONY: init test clean
.PHONY: init test lint clean
test: init
mocha -R spec
lint:
jshint cfb.js
init:
if [ ! -e test_files ]; then git clone https://github.com/Niggler/test_files; fi
cd test_files; make

8
cfb.js

@ -243,7 +243,7 @@ for(j = 0; blob.l != 512; ) {
var nsectors = Math.ceil((file.length - ssz)/ssz);
var sectors = [];
for(var i=1; i != nsectors; ++i) sectors[i-1] = file.slice(i*ssz,(i+1)*ssz);
sectors[nsectors-1] = file.slice(nsectors*ssz)
sectors[nsectors-1] = file.slice(nsectors*ssz);
/** Chase down the rest of the DIFAT chain to build a comprehensive list
DIFAT chains by storing the next sector number as the last 32 bytes */
@ -327,8 +327,8 @@ function read_directory(idx) {
o.content = sector_list[o.start].data.slice(0,o.size);
} catch(e) {
o.start = o.start - 1;
sector_list[o.start].name = o.name;
o.content = sector_list[o.start].data.slice(0,o.size);
sector_list[o.start].name = o.name;
o.content = sector_list[o.start].data.slice(0,o.size);
}
prep_blob(o.content);
} else {
@ -373,7 +373,7 @@ function build_full_paths(Dir, pathobj, paths, patharr) {
if(Dir[i].type === "unknown") continue;
var j = dad[i];
if(j === 0) paths[i] = paths[0] + "/" + paths[i];
else while(j != 0) {
else while(j !== 0) {
paths[i] = paths[j] + "/" + paths[i];
j = dad[j];
}