Skip to content
This repository has been archived by the owner on Apr 3, 2024. It is now read-only.

Commit

Permalink
update resolveFullPath_ to use stripFileProtocol_
Browse files Browse the repository at this point in the history
  • Loading branch information
DominicKramer committed Nov 19, 2018
1 parent 2afe051 commit 1e32a4f
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions src/agent/state/inspector-state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -278,14 +278,9 @@ class StateResolver {
return '';
}
const scriptUrl = this.scriptmapper[scriptId].url;
if (scriptUrl.startsWith('file://')) {
// In Node 11+, non-internal files are formatted as URLs, so get just the
// path.
return scriptUrl.slice('file://'.length);
} else {
// Internal files should be returned as is.
return scriptUrl;
}
// In Node 11+, non-internal files are formatted as URLs, so get just the
// path.
return StateResolver.stripFileProtocol_(scriptUrl);
}

resolveRelativePath_(frame: inspector.Debugger.CallFrame): string {
Expand All @@ -306,7 +301,6 @@ class StateResolver {
}

isPathInCurrentWorkingDirectory_(path: string): boolean {
// return true;
return StateResolver.stripFileProtocol_(path).indexOf(
this.config.workingDirectory) === 0;
}
Expand Down

0 comments on commit 1e32a4f

Please sign in to comment.