Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2sharp.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'LibGit2Sharp/Repository.cs')
-rw-r--r--LibGit2Sharp/Repository.cs7
1 files changed, 6 insertions, 1 deletions
diff --git a/LibGit2Sharp/Repository.cs b/LibGit2Sharp/Repository.cs
index bdf84e48..a3303d99 100644
--- a/LibGit2Sharp/Repository.cs
+++ b/LibGit2Sharp/Repository.cs
@@ -155,7 +155,12 @@ namespace LibGit2Sharp
/// <returns>True if a repository can be resolved through this path; false otherwise</returns>
static public bool IsValid(string path)
{
- Ensure.ArgumentNotNullOrEmptyString(path, "path");
+ Ensure.ArgumentNotNull(path, "path");
+
+ if (string.IsNullOrWhiteSpace(path))
+ {
+ return false;
+ }
try
{