Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 1 addition & 19 deletions debugger/debugger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -821,25 +821,7 @@ export namespace Debugger {
}

function comparePaths(a: string, b: string) {
let aLen = a.length;
const bLen = b.length;
if (aLen === bLen) {
return a === b;
}
//Ensure 'a' is the shorter path
if (bLen < aLen) {
[a, aLen, b] = [b, bLen, a];
}
if (a !== b.sub(-aLen)) {
return false;
}
//If shorter string doesn't start with '/', make sure the longer one has '/' right before the substring
//so we don't match a partial filename.
if (a.sub(1, 1) === Path.separator) {
return true;
}
const bSep = -(aLen + 1);
return b.sub(bSep, bSep) === Path.separator;
return Path.getAbsolute(a) === Path.getAbsolute(b);
}

const debugHookStackOffset = 2;
Expand Down