* Stylecop Rules and Fixes
This commit is contained in:
Qstick
2020-01-03 07:49:24 -05:00
committed by GitHub
parent 63d669178d
commit f77a2feeef
1307 changed files with 8704 additions and 7404 deletions
@@ -7,7 +7,6 @@ namespace NzbDrone.Core.Validation.Paths
public class StartupFolderValidator : PropertyValidator
{
private readonly IAppFolderInfo _appFolderInfo;
public StartupFolderValidator(IAppFolderInfo appFolderInfo)
: base("Path cannot be an ancestor of the start up folder")
@@ -17,9 +16,12 @@ namespace NzbDrone.Core.Validation.Paths
protected override bool IsValid(PropertyValidatorContext context)
{
if (context.PropertyValue == null) return true;
if (context.PropertyValue == null)
{
return true;
}
return !_appFolderInfo.StartUpFolder.IsParentPath(context.PropertyValue.ToString());
}
}
}
}