fixed http 500 error.

This commit is contained in:
kay.one 2012-01-22 20:34:30 -08:00
commit a68c882032
2 changed files with 12 additions and 0 deletions

View file

@ -24,6 +24,16 @@ namespace NzbDrone.Common
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)
{
return Directory.Exists(path);