From b8ef42b3b6f054edf5f7cbb92f923547ef87c1d9 Mon Sep 17 00:00:00 2001 From: Anass <45261478+anasdeyra@users.noreply.github.com> Date: Thu, 2 Oct 2025 16:38:44 +0100 Subject: [PATCH] Update Address.ts Better handle cross-platform URIs --- src/Address.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Address.ts b/src/Address.ts index 8b506a7..7106cfc 100644 --- a/src/Address.ts +++ b/src/Address.ts @@ -46,7 +46,7 @@ export class Address { addressURL = url.pathToFileURL(cachePath).href; this.isLocal = true; } else if (addressURI.substring(0, 5) == "file:") { - const match = addressURI.match(/^file:(?:\/\/)?(\.?\.?\/?.*)/); + const match = addressURI.match(/^file:(?:\/\/\/?)([A-Za-z]:\/.*|\.?\.?\/?.*)/); if (!match) { throw new Error(`Invalid input: "${addressURI}"`); }