Skip to content

Commit ae0f195

Browse files
committed
Handle Windows absolute paths in resolveUriToFile
1 parent eaee63c commit ae0f195

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

lib/fingerprints.js

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/fingerprints.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/fingerprints.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import * as fs from "fs";
2+
import path from "path";
23

34
import Long from "long";
45

@@ -226,7 +227,7 @@ export function resolveUriToFile(
226227
// Just assume a relative path is relative to the src root.
227228
// This is not necessarily true but should be a good approximation
228229
// and here we likely want to err on the side of handling more cases.
229-
if (!uri.startsWith("/")) {
230+
if (!path.isAbsolute(uri)) {
230231
uri = srcRootPrefix + uri;
231232
}
232233

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy