From bb3695bc354629b832b64dc8d7f1e68cf176bcc6 Mon Sep 17 00:00:00 2001 From: Jannis Baum Date: Thu, 11 Jul 2024 16:28:35 +0200 Subject: [PATCH] fix(#74): regex --- src/utils/path.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/path.ts b/src/utils/path.ts index cbe3d0fb..27cecb0b 100644 --- a/src/utils/path.ts +++ b/src/utils/path.ts @@ -22,7 +22,7 @@ export const pcomponents = (path: string) => { export const urlToPath = (url: string) => { const path = decodeURIComponent(url.replace(/^\/(viewer|health)/, '')) - .replace(/^~/, homedir()) + .replace(/^\/~/, homedir()) .replace(/\/+$/, ''); return path === '' ? '/' : path; };