Skip to content

Commit

Permalink
Merge pull request #500 from Stapxs/patch-1
Browse files Browse the repository at this point in the history
fix: 在处理 file uri 时可能会意外忽略 fragment 段
  • Loading branch information
MliKiowa authored Nov 7, 2024
2 parents 4787fa5 + 2ee0fed commit 2a23820
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/common/file.ts
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ export async function checkUriType(Uri: string) {
}
if (uri.startsWith('file://')) {
let filePath: string;
const pathname = decodeURIComponent(new URL(uri).pathname);
const pathname = decodeURIComponent(new URL(uri).pathname + new URL(uri).hash);
if (process.platform === 'win32') {
filePath = pathname.slice(1);
} else {
Expand Down

0 comments on commit 2a23820

Please sign in to comment.