diff options
Diffstat (limited to 'MediaBrowser.Server.Mono/Program.cs')
| -rw-r--r-- | MediaBrowser.Server.Mono/Program.cs | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/MediaBrowser.Server.Mono/Program.cs b/MediaBrowser.Server.Mono/Program.cs index 3bcfff983..8d0c9ee0e 100644 --- a/MediaBrowser.Server.Mono/Program.cs +++ b/MediaBrowser.Server.Mono/Program.cs @@ -24,6 +24,7 @@ using Mono.Unix.Native; using ILogger = MediaBrowser.Model.Logging.ILogger; using X509Certificate = System.Security.Cryptography.X509Certificates.X509Certificate; using System.Threading; +using InteropServices = System.Runtime.InteropServices; namespace MediaBrowser.Server.Mono { @@ -87,12 +88,19 @@ namespace MediaBrowser.Server.Mono { if (string.IsNullOrEmpty(programDataPath)) { - programDataPath = ApplicationPathHelper.GetProgramDataPath(applicationPath); + if (InteropServices.RuntimeInformation.IsOSPlatform(InteropServices.OSPlatform.Windows)) + { + programDataPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "jellyfin"); + } + else + { + programDataPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), ".jellyfin"); + } } var appFolderPath = Path.GetDirectoryName(applicationPath); - return new ServerApplicationPaths(programDataPath, appFolderPath, Path.GetDirectoryName(applicationPath)); + return new ServerApplicationPaths(programDataPath, appFolderPath, appFolderPath); } private static void RunApplication(ServerApplicationPaths appPaths, ILogManager logManager, StartupOptions options) |
