diff --git a/src/modules/launcher/Plugins/Community.PowerToys.Run.Plugin.VSCodeWorkspaces/WorkspacesHelper/VSCodeWorkspacesApi.cs b/src/modules/launcher/Plugins/Community.PowerToys.Run.Plugin.VSCodeWorkspaces/WorkspacesHelper/VSCodeWorkspacesApi.cs index 0be408dc4947..6152d4c391f5 100644 --- a/src/modules/launcher/Plugins/Community.PowerToys.Run.Plugin.VSCodeWorkspaces/WorkspacesHelper/VSCodeWorkspacesApi.cs +++ b/src/modules/launcher/Plugins/Community.PowerToys.Run.Plugin.VSCodeWorkspaces/WorkspacesHelper/VSCodeWorkspacesApi.cs @@ -46,7 +46,7 @@ private VSCodeWorkspace ParseVSCodeUriAndAuthority(string uri, string authority, path = path[1..]; } - if (!DoesPathExist(path, workspaceEnv.Value, machineName)) + if (!DoesPathExist(path, workspaceEnv.Value)) { return null; } @@ -72,18 +72,11 @@ private VSCodeWorkspace ParseVSCodeUriAndAuthority(string uri, string authority, }; } - private bool DoesPathExist(string path, WorkspaceEnvironment workspaceEnv, string machineName) + private bool DoesPathExist(string path, WorkspaceEnvironment workspaceEnv) { - if (workspaceEnv == WorkspaceEnvironment.Local || workspaceEnv == WorkspaceEnvironment.RemoteWSL) + if (workspaceEnv == WorkspaceEnvironment.Local) { - var resolvedPath = path; - - if (workspaceEnv == WorkspaceEnvironment.RemoteWSL) - { - resolvedPath = $"\\\\wsl$\\{machineName}{resolvedPath.Replace('/', '\\')}"; - } - - return Directory.Exists(resolvedPath) || File.Exists(resolvedPath); + return Directory.Exists(path) || File.Exists(path); } // If the workspace environment is not Local or WSL, assume the path exists