mirror of
https://fastgit.cc/github.com/sourcegit-scm/sourcegit
synced 2026-04-21 21:30:37 +08:00
code_review: PR #1442
Trim both `\` (on Windows) and `/` (on Linux/macOS) characters at the end of path Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
@@ -26,7 +26,7 @@ namespace SourceGit.Views
|
||||
{
|
||||
var folder = selected[0];
|
||||
var folderPath = folder is { Path: { IsAbsoluteUri: true } path } ? path.LocalPath : folder?.Path.ToString();
|
||||
TxtLocation.Text = folderPath.TrimEnd('\\');
|
||||
TxtLocation.Text = folderPath.TrimEnd(['\\', '/']);
|
||||
}
|
||||
}
|
||||
catch (Exception exception)
|
||||
|
||||
Reference in New Issue
Block a user