mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-06-21 18:35:00 +00:00
enhance: unified all file-path normalization - use char-replace, trim trailing slash
This commit is contained in:
parent
54c05ac35a
commit
88c38b4139
8 changed files with 15 additions and 17 deletions
|
@ -455,9 +455,7 @@ namespace SourceGit.ViewModels
|
|||
|
||||
public RepositoryNode FindOrAddNodeByRepositoryPath(string repo, RepositoryNode parent, bool shouldMoveNode)
|
||||
{
|
||||
var normalized = repo.Replace('\\', '/');
|
||||
if (normalized.EndsWith("/"))
|
||||
normalized = normalized.TrimEnd('/');
|
||||
var normalized = repo.Replace('\\', '/').TrimEnd('/');
|
||||
|
||||
var node = FindNodeRecursive(normalized, RepositoryNodes);
|
||||
if (node == null)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue