Skip to content

Commit

Permalink
Merge remote-tracking branch 'dckc/find-mod-grandparent' into ag-linu…
Browse files Browse the repository at this point in the history
…x-cli
  • Loading branch information
dckc committed Dec 26, 2019
2 parents f690418 + 1e807cd commit 6b48fff
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions xs/sources/xsPlatforms.c
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,11 @@ txID fxFindModule(txMachine* the, txSlot* realm, txID moduleID, txSlot* slot)
relative = 1;
}
else if ((name[0] == '.') && (name[1] == '.') && (name[2] == '/')) {
dot = 2;
if ((name[3] == '.') && (name[4] == '.') && (name[5] == '/')) {
dot = 5;
} else {
dot = 2;
}
relative = 1;
}
#if mxWindows
Expand Down Expand Up @@ -225,11 +229,17 @@ txID fxFindModule(txMachine* the, txSlot* realm, txID moduleID, txSlot* slot)
return XS_NO_ID;
if (dot == 0)
slash++;
else if (dot == 2) {
else if (dot > 1) {
*slash = 0;
slash = c_strrchr(path, mxSeparator);
if (!slash)
return XS_NO_ID;
if (dot > 2) {
*slash = 0;
slash = c_strrchr(path, mxSeparator);
if (!slash)
return XS_NO_ID;
}
}
if (preparation) {
if (!c_strncmp(path, preparation->base, preparation->baseLength)) {
Expand Down

0 comments on commit 6b48fff

Please sign in to comment.