From 189cb3897220df1f38161c3c2f02c7d17227561d Mon Sep 17 00:00:00 2001 From: Evan Simkowitz Date: Wed, 22 Jan 2025 17:56:44 -0800 Subject: [PATCH] Fix tilde paths --- pkg/remote/connparse/connparse.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/remote/connparse/connparse.go b/pkg/remote/connparse/connparse.go index 44a71137a0..4f045e637c 100644 --- a/pkg/remote/connparse/connparse.go +++ b/pkg/remote/connparse/connparse.go @@ -132,7 +132,7 @@ func ParseURI(uri string) (*Connection, error) { } if strings.HasPrefix(remotePath, "/~") { remotePath = strings.TrimPrefix(remotePath, "/") - } else if len(remotePath) > 1 && !windowsDriveRegex.MatchString(remotePath) && !strings.HasPrefix(remotePath, "/") { + } else if len(remotePath) > 1 && !windowsDriveRegex.MatchString(remotePath) && !strings.HasPrefix(remotePath, "/") && !strings.HasPrefix(remotePath, "~") { remotePath = "/" + remotePath } }