Skip to content

Commit

Permalink
Merge pull request #75 from jannis-baum/issue/74-fix-parsing-tilde-in…
Browse files Browse the repository at this point in the history
…-url

Fix parsing tilde in URL
  • Loading branch information
jannis-baum authored Jul 11, 2024
2 parents 9dbdcf4 + bb3695b commit 717c068
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/path.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};
Expand Down

0 comments on commit 717c068

Please sign in to comment.