@ -394,6 +394,11 @@ namespace NzbDrone.Common
public void SetPermissions ( string filename , string account , FileSystemRights rights , AccessControlType controlType )
{
try
{
var directoryInfo = new DirectoryInfo ( filename ) ;
var directorySecurity = directoryInfo . GetAccessControl ( ) ;
@ -405,6 +410,13 @@ namespace NzbDrone.Common
directorySecurity . AddAccessRule ( accessRule ) ;
directoryInfo . SetAccessControl ( directorySecurity ) ;
}
catch ( Exception e )
{
Logger . WarnException ( string . Format ( "Couldn't set permission for {0}. account:{1} rights:{2} accessControlType:{3}" , filename , account , rights , controlType ) , e ) ;
throw ;
}
}
public bool IsParent ( string parent , string subfolder )
{