mirror of
https://github.com/Sonarr/Sonarr
synced 2024-12-25 17:27:18 +00:00
fixed http 500 error.
This commit is contained in:
parent
54881a0e4a
commit
a68c882032
2 changed files with 12 additions and 0 deletions
|
@ -24,6 +24,16 @@ namespace NzbDrone.Common
|
||||||
|
|
||||||
private static readonly Logger Logger = LogManager.GetCurrentClassLogger();
|
private static readonly Logger Logger = LogManager.GetCurrentClassLogger();
|
||||||
|
|
||||||
|
public virtual DateTime GetLastDirectoryWrite(string path)
|
||||||
|
{
|
||||||
|
if (!FolderExists(path))
|
||||||
|
{
|
||||||
|
throw new DirectoryNotFoundException("Directory doesn't exist. " + path);
|
||||||
|
}
|
||||||
|
|
||||||
|
GetFiles(path, SearchOption.AllDirectories);
|
||||||
|
}
|
||||||
|
|
||||||
public virtual bool FolderExists(string path)
|
public virtual bool FolderExists(string path)
|
||||||
{
|
{
|
||||||
return Directory.Exists(path);
|
return Directory.Exists(path);
|
||||||
|
|
|
@ -179,6 +179,7 @@ namespace NzbDrone.Core.Test
|
||||||
Mocker.Resolve<TestUrlIndexer>().FetchRss();
|
Mocker.Resolve<TestUrlIndexer>().FetchRss();
|
||||||
|
|
||||||
Mark500Inconclusive();
|
Mark500Inconclusive();
|
||||||
|
ExceptionVerification.IgnoreWarns();
|
||||||
}
|
}
|
||||||
|
|
||||||
[TestCase("simpsons", 21, 23)]
|
[TestCase("simpsons", 21, 23)]
|
||||||
|
@ -387,6 +388,7 @@ namespace NzbDrone.Core.Test
|
||||||
{
|
{
|
||||||
ExceptionVerification.MarkInconclusive(typeof(WebException));
|
ExceptionVerification.MarkInconclusive(typeof(WebException));
|
||||||
ExceptionVerification.MarkInconclusive("System.Net.WebException");
|
ExceptionVerification.MarkInconclusive("System.Net.WebException");
|
||||||
|
ExceptionVerification.MarkInconclusive("(503) Server Unavailable.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue