mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-06-22 10:55:00 +00:00
using the new syntax
This commit is contained in:
parent
81f02a20c5
commit
478280625d
9 changed files with 69 additions and 95 deletions
|
@ -22,7 +22,7 @@ namespace SourceGit.Converters
|
|||
var home = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile);
|
||||
var prefixLen = home.EndsWith('/') ? home.Length - 1 : home.Length;
|
||||
if (v.StartsWith(home, StringComparison.Ordinal))
|
||||
return "~" + v.Substring(prefixLen);
|
||||
return $"~{v.AsSpan()[prefixLen..]}";
|
||||
|
||||
return v;
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue