From 839fb4b1631f414443d52e0060f242ee4610bd12 Mon Sep 17 00:00:00 2001 From: Toast <96593068+AnxietyisReal@users.noreply.github.com> Date: Sun, 7 Jan 2024 02:19:17 +1100 Subject: [PATCH] Add home dir --- src/helpers/UsernameHelper.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/helpers/UsernameHelper.ts b/src/helpers/UsernameHelper.ts index 921601b..dc0f8bb 100644 --- a/src/helpers/UsernameHelper.ts +++ b/src/helpers/UsernameHelper.ts @@ -1,4 +1,4 @@ export default (text:string)=>{ const dirSlash = process.platform === 'linux' ? '\/' : '\\'; - return text?.replace(/(?<=\/Users\/|\/media\/)[^/]+/g, match=>'・'.repeat(match.length)).split(dirSlash).join(dirSlash); + return text?.replace(/(?<=\/Users\/|\/home\/|\/media\/)[^/]+/g, match=>'・'.repeat(match.length)).split(dirSlash).join(dirSlash); }