fix: fix working tree folder path detection error

Fix the error of adding an extra slash when selecting a working tree directory.
This commit is contained in:
Ihor 2025-06-20 23:47:31 +03:00
parent 74d77ab704
commit a29a35059b

View file

@ -26,7 +26,7 @@ namespace SourceGit.Views
{ {
var folder = selected[0]; var folder = selected[0];
var folderPath = folder is { Path: { IsAbsoluteUri: true } path } ? path.LocalPath : folder?.Path.ToString(); var folderPath = folder is { Path: { IsAbsoluteUri: true } path } ? path.LocalPath : folder?.Path.ToString();
TxtLocation.Text = folderPath; TxtLocation.Text = folderPath.TrimEnd('\\');
} }
} }
catch (Exception exception) catch (Exception exception)