Fixes #5 #6

Merged
rossj merged 1 commits from master into master 2019-06-10 12:45:17 +00:00
7 changed files with 35 additions and 42 deletions

@ -23,13 +23,12 @@ function build_full_paths(FI/*:CFBFileIndex*/, FP/*:Array<string>*/, Paths/*:Arr
for(i=1; i < pl; ++i) {
if(FI[i].type === 0 /* unknown */) continue;
j = dad[i];
if(j === 0) FP[i] = FP[0] + "/" + FP[i];
else while(j !== 0 && j !== dad[j]) {
FP[i] = FP[j] + "/" + FP[i];
j = i;
do {
j = dad[j];
}
dad[i] = 0;
FP[i] = FP[j] + "/" + FP[i];
} while (j !== 0 && -1 !== dad[j]);
dad[i] = -1;
}
FP[0] += "/";

@ -552,13 +552,12 @@ function build_full_paths(FI/*:CFBFileIndex*/, FP/*:Array<string>*/, Paths/*:Arr
for(i=1; i < pl; ++i) {
if(FI[i].type === 0 /* unknown */) continue;
j = dad[i];
if(j === 0) FP[i] = FP[0] + "/" + FP[i];
else while(j !== 0 && j !== dad[j]) {
FP[i] = FP[j] + "/" + FP[i];
j = i;
do {
j = dad[j];
}
dad[i] = 0;
FP[i] = FP[j] + "/" + FP[i];
} while (j !== 0 && -1 !== dad[j]);
dad[i] = -1;
}
FP[0] += "/";

11
cfb.js

@ -534,13 +534,12 @@ function build_full_paths(FI, FP, Paths) {
for(i=1; i < pl; ++i) {
if(FI[i].type === 0 /* unknown */) continue;
j = dad[i];
if(j === 0) FP[i] = FP[0] + "/" + FP[i];
else while(j !== 0 && j !== dad[j]) {
FP[i] = FP[j] + "/" + FP[i];
j = i;
do {
j = dad[j];
}
dad[i] = 0;
FP[i] = FP[j] + "/" + FP[i];
} while (j !== 0 && -1 !== dad[j]);
dad[i] = -1;
}
FP[0] += "/";

11
dist/cfb.js vendored

@ -534,13 +534,12 @@ function build_full_paths(FI, FP, Paths) {
for(i=1; i < pl; ++i) {
if(FI[i].type === 0 /* unknown */) continue;
j = dad[i];
if(j === 0) FP[i] = FP[0] + "/" + FP[i];
else while(j !== 0 && j !== dad[j]) {
FP[i] = FP[j] + "/" + FP[i];
j = i;
do {
j = dad[j];
}
dad[i] = 0;
FP[i] = FP[j] + "/" + FP[i];
} while (j !== 0 && -1 !== dad[j]);
dad[i] = -1;
}
FP[0] += "/";

11
dist/xlscfb.js vendored

@ -399,13 +399,12 @@ function build_full_paths(FI/*:CFBFileIndex*/, FP/*:Array<string>*/, Paths/*:Arr
for(i=1; i < pl; ++i) {
if(FI[i].type === 0 /* unknown */) continue;
j = dad[i];
if(j === 0) FP[i] = FP[0] + "/" + FP[i];
else while(j !== 0 && j !== dad[j]) {
FP[i] = FP[j] + "/" + FP[i];
j = i;
do {
j = dad[j];
}
dad[i] = 0;
FP[i] = FP[j] + "/" + FP[i];
} while (j !== 0 && -1 !== dad[j]);
dad[i] = -1;
}
FP[0] += "/";

@ -399,13 +399,12 @@ function build_full_paths(FI/*:CFBFileIndex*/, FP/*:Array<string>*/, Paths/*:Arr
for(i=1; i < pl; ++i) {
if(FI[i].type === 0 /* unknown */) continue;
j = dad[i];
if(j === 0) FP[i] = FP[0] + "/" + FP[i];
else while(j !== 0 && j !== dad[j]) {
FP[i] = FP[j] + "/" + FP[i];
j = i;
do {
j = dad[j];
}
dad[i] = 0;
FP[i] = FP[j] + "/" + FP[i];
} while (j !== 0 && -1 !== dad[j]);
dad[i] = -1;
}
FP[0] += "/";

@ -366,13 +366,12 @@ function build_full_paths(FI, FP, Paths) {
for(i=1; i < pl; ++i) {
if(FI[i].type === 0 /* unknown */) continue;
j = dad[i];
if(j === 0) FP[i] = FP[0] + "/" + FP[i];
else while(j !== 0 && j !== dad[j]) {
FP[i] = FP[j] + "/" + FP[i];
j = i;
do {
j = dad[j];
}
dad[i] = 0;
FP[i] = FP[j] + "/" + FP[i];
} while (j !== 0 && -1 !== dad[j]);
dad[i] = -1;
}
FP[0] += "/";