Skip to content

Commit 292129e

Browse files
committed
feat: add standalone and forward-slash tilde suport
1 parent 35e4bd8 commit 292129e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Files.App/Utils/Storage/Helpers/StorageFileExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ private static PathBoxItem GetPathItem(string component, string path)
302302

303303
private static string GetPathWithoutEnvironmentVariable(string path)
304304
{
305-
if (path.StartsWith("~\\", StringComparison.Ordinal))
305+
if (path.StartsWith("~\\", StringComparison.Ordinal) || path.StartsWith("~/", StringComparison.Ordinal) || path.Equals("~", StringComparison.Ordinal))
306306
path = $"{Constants.UserEnvironmentPaths.HomePath}{path.Remove(0, 1)}";
307307

308308
path = path.Replace("%temp%", Constants.UserEnvironmentPaths.TempPath, StringComparison.OrdinalIgnoreCase);

0 commit comments

Comments
 (0)