NCrunch works for unit tests

This commit is contained in:
Mark McDowall 2012-09-28 22:09:07 -07:00
commit 35511a8b76
7 changed files with 52 additions and 9 deletions

View file

@ -64,7 +64,6 @@ namespace NzbDrone.Common
if (!string.IsNullOrWhiteSpace(applicationPath))
return applicationPath;
applicationPath = CrawlToRoot(Environment.CurrentDirectory);
if (!string.IsNullOrWhiteSpace(applicationPath))
return applicationPath;
@ -83,6 +82,9 @@ namespace NzbDrone.Common
public string CrawlToRoot(string dir)
{
if (String.IsNullOrWhiteSpace(dir))
return null;
var directoryInfo = new DirectoryInfo(dir);
while (!IsRoot(directoryInfo))