Skip to content

Commit

Permalink
Recent repo list : prevent crash when shortening path
Browse files Browse the repository at this point in the history
  • Loading branch information
pmiossec committed Mar 9, 2014
1 parent 6aa538b commit 8376001
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion GitCommands/Repository/RecentRepoInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,8 @@ private void AddToOrderedSignDir(SortedList<string, List<RecentRepoInfo>> ordere
if (shortenPath && repoInfo.DirInfo != null)
{
string s = repoInfo.DirName.Substring(repoInfo.DirInfo.FullName.Length);
s = Path.GetDirectoryName(s);
if (!s.IsNullOrEmpty())
s = Path.GetDirectoryName(s);
//candidate for short name
repoInfo.Caption = repoInfo.ShortName;
if (!s.IsNullOrEmpty())
Expand Down

0 comments on commit 8376001

Please sign in to comment.