1
0
Fork 0
mirror of https://github.com/Sonarr/Sonarr synced 2024-12-27 18:28:19 +00:00

handling of blank paths during validation.

This commit is contained in:
kay.one 2013-08-31 13:46:59 -07:00
parent 9e08dffa58
commit daabc6364d
2 changed files with 2 additions and 1 deletions

View file

@ -12,6 +12,7 @@ namespace NzbDrone.Api.Validation
protected override bool IsValid(PropertyValidatorContext context)
{
if (context.PropertyValue == null) return false;
return context.PropertyValue.ToString().IsPathValid();
}
}

View file

@ -50,7 +50,7 @@ namespace NzbDrone.Common
public static bool IsPathValid(this string path)
{
if (path.ContainsInvalidPathChars())
if (path.ContainsInvalidPathChars() || string.IsNullOrWhiteSpace(path))
{
return false;
}