Skip to content

Commit

Permalink
Fixed a crash with paths containing trailing spaces.
Browse files Browse the repository at this point in the history
Directory.Exists removes trailing spaces before checking the folder, but
the FileSystemWatched does not.
  • Loading branch information
drivesmoothly committed Apr 4, 2018
1 parent 798d2fc commit 9f20a61
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Logic/RepositoryWatcher.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
Expand Down Expand Up @@ -62,7 +62,7 @@ public RepositoryWatcher(string path, Boolean isBare)

public void Dispose()
{
_watcher.Dispose();
_watcher?.Dispose();
}

~RepositoryWatcher()
Expand Down
2 changes: 1 addition & 1 deletion Logic/ViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public string RepositoryPath
get { return _repositoryPath; }
set
{
_repositoryPath = value;
_repositoryPath = value.TrimEnd();
if (IsValidGitRepository(_repositoryPath))
{
OnPropertyChanged("WindowTitle");
Expand Down

0 comments on commit 9f20a61

Please sign in to comment.