mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-22 22:14:44 -04:00
New: Health check warning for macOS when running from App Translocation folder
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user