mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-24 22:35:39 -04:00
@@ -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());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user