From 4deac98c4eb8429d750d5ddfda8fede82145933c Mon Sep 17 00:00:00 2001 From: Aikawa Yataro Date: Mon, 16 Sep 2024 08:51:39 +0000 Subject: [PATCH] fix: crash when trying to open terminal from the Welcome screen --- src/Native/Linux.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Native/Linux.cs b/src/Native/Linux.cs index 9537a39a..30aa7cc9 100644 --- a/src/Native/Linux.cs +++ b/src/Native/Linux.cs @@ -78,7 +78,8 @@ namespace SourceGit.Native } var startInfo = new ProcessStartInfo(); - startInfo.WorkingDirectory = string.IsNullOrEmpty(workdir) ? "~" : workdir; + var home = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile); + startInfo.WorkingDirectory = string.IsNullOrEmpty(workdir) ? home : workdir; startInfo.FileName = OS.ShellOrTerminal; Process.Start(startInfo); }