Your ROOT_URL in app.ini is https://git.cloudchain.link/ but you are visiting https://dash.bss.nz/open-source-mirrors/Sonarr/commit/d3890bd712cad129d672f9e02c9992b0d8c45a6e
You should set ROOT_URL correctly, otherwise the web may not work correctly.
3 changed files with
40 additions and
1 deletions
@ -1,5 +1,7 @@
using NUnit.Framework ;
using FluentAssertions ;
using NUnit.Framework ;
using NzbDrone.Common.EnsureThat ;
using NzbDrone.Common.Extensions ;
using NzbDrone.Test.Common ;
namespace NzbDrone.Common.Test.EnsureTest
@ -22,5 +24,18 @@ namespace NzbDrone.Common.Test.EnsureTest
MonoOnly ( ) ;
Ensure . That ( path , ( ) = > path ) . IsValidPath ( ) ;
}
[Test]
public void GetAncestorFolders_should_return_all_ancestors_in_path ( )
{
var path = @"C:\Test\TV\Series Title" . AsOsAgnostic ( ) ;
var result = path . GetAncestorFolders ( ) ;
result . Count . Should ( ) . Be ( 4 ) ;
result [ 0 ] . Should ( ) . Be ( @"C:\" . AsOsAgnostic ( ) ) ;
result [ 1 ] . Should ( ) . Be ( @"Test" . AsOsAgnostic ( ) ) ;
result [ 2 ] . Should ( ) . Be ( @"TV" . AsOsAgnostic ( ) ) ;
result [ 3 ] . Should ( ) . Be ( @"Series Title" . AsOsAgnostic ( ) ) ;
}
}
}
@ -1,4 +1,5 @@
using System ;
using System.Collections.Generic ;
using System.IO ;
using System.Text.RegularExpressions ;
using NzbDrone.Common.EnsureThat ;
@ -174,6 +175,21 @@ namespace NzbDrone.Common.Extensions
return Path . Combine ( GetProperCapitalization ( dirInfo ) , fileName ) ;
}
public static List < string > GetAncestorFolders ( this string path )
{
var directory = new DirectoryInfo ( path ) ;
var directories = new List < string > ( ) ;
while ( directory ! = null )
{
directories . Insert ( 0 , directory . Name ) ;
directory = directory . Parent ;
}
return directories ;
}
public static string GetAppDataPath ( this IAppFolderInfo appFolderInfo )
{
return appFolderInfo . AppDataFolder ;
@ -2,6 +2,7 @@
using System.IO ;
using NzbDrone.Common.Disk ;
using NzbDrone.Common.EnvironmentInfo ;
using NzbDrone.Common.Extensions ;
using NzbDrone.Core.Configuration ;
using NzbDrone.Core.Update ;
@ -33,6 +34,13 @@ namespace NzbDrone.Core.HealthCheck.Checks
if ( ( OsInfo . IsWindows | | _configFileProvider . UpdateAutomatically ) & &
_configFileProvider . UpdateMechanism = = UpdateMechanism . BuiltIn )
{
if ( OsInfo . IsOsx & & startupFolder . GetAncestorFolders ( ) . Contains ( "AppTranslocation" ) )
{
return new HealthCheck ( GetType ( ) , HealthCheckResult . Error ,
string . Format ( "Cannot install update because startup folder '{0}' is in an App Translocation folder." , startupFolder ) ,
"Cannot install update because startup folder is in an App Translocation folder." ) ;
}
if ( ! _diskProvider . FolderWritable ( startupFolder ) )
{
return new HealthCheck ( GetType ( ) , HealthCheckResult . Error ,