Skip to content

Commit e63db0c

Browse files
chore: replace windowsToUnixPath with filepath.ToSlash
1 parent 93bf7b7 commit e63db0c

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

cli/open.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ func buildVSCodeWorkspaceDevContainerLink(
431431
containerName string,
432432
containerFolder string,
433433
) (*url.URL, url.Values) {
434-
containerFolder = windowsToUnixPath(containerFolder)
434+
containerFolder = filepath.ToSlash(containerFolder)
435435

436436
qp := url.Values{}
437437
qp.Add("url", clientURL)
@@ -525,10 +525,6 @@ func unixToWindowsPath(p string) string {
525525
return strings.ReplaceAll(p, "/", "\\")
526526
}
527527

528-
func windowsToUnixPath(p string) string {
529-
return strings.ReplaceAll(p, "\\", "/")
530-
}
531-
532528
// resolveAgentAbsPath resolves the absolute path to a file or directory in the
533529
// workspace. If the path is relative, it will be resolved relative to the
534530
// workspace's expanded directory. If the path is absolute, it will be returned

0 commit comments

Comments
 (0)