Skip to content

Commit ae5c327

Browse files
Fix: Fixed issue where open in VS Code didn't work if there were spaces in the path (#12667)
1 parent 0a5cbc1 commit ae5c327

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Files.App/Actions/Open/OpenInVSAction.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ private void Context_PropertyChanged(object? sender, PropertyChangedEventArgs e)
3737

3838
public Task ExecuteAsync()
3939
{
40-
Win32API.RunPowershellCommand($"start {_context.SolutionFilePath}", false);
40+
Win32API.RunPowershellCommand($"start \'{_context.SolutionFilePath}\'", false);
4141

4242
return Task.CompletedTask;
4343
}

src/Files.App/Actions/Open/OpenInVSCodeAction.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public OpenInVSCodeAction()
3131

3232
public Task ExecuteAsync()
3333
{
34-
Win32API.RunPowershellCommand($"code {_context.ShellPage?.FilesystemViewModel.WorkingDirectory}", false);
34+
Win32API.RunPowershellCommand($"code \'{_context.ShellPage?.FilesystemViewModel.WorkingDirectory}\'", false);
3535

3636
return Task.CompletedTask;
3737
}

0 commit comments

Comments
 (0)