mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-16 14:03:03 +03:00
Make config path configurable
This commit is contained in:
@@ -12,11 +12,16 @@ namespace Emby.Server.Implementations.AppBase
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="BaseApplicationPaths"/> class.
|
||||
/// </summary>
|
||||
protected BaseApplicationPaths(string programDataPath, string appFolderPath, string logDirectoryPath)
|
||||
protected BaseApplicationPaths(
|
||||
string programDataPath,
|
||||
string appFolderPath,
|
||||
string logDirectoryPath = null,
|
||||
string configurationDirectoryPath = null)
|
||||
{
|
||||
ProgramDataPath = programDataPath;
|
||||
ProgramSystemPath = appFolderPath;
|
||||
LogDirectoryPath = logDirectoryPath;
|
||||
ConfigurationDirectoryPath = configurationDirectoryPath;
|
||||
}
|
||||
|
||||
public string ProgramDataPath { get; private set; }
|
||||
@@ -134,6 +139,11 @@ namespace Emby.Server.Implementations.AppBase
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The _config directory
|
||||
/// </summary>
|
||||
private string _configurationDirectoryPath;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the path to the application configuration root directory
|
||||
/// </summary>
|
||||
@@ -142,7 +152,18 @@ namespace Emby.Server.Implementations.AppBase
|
||||
{
|
||||
get
|
||||
{
|
||||
return Path.Combine(ProgramDataPath, "config");
|
||||
if (string.IsNullOrEmpty(_configurationDirectoryPath))
|
||||
{
|
||||
_configurationDirectoryPath = Path.Combine(ProgramDataPath, "config");
|
||||
|
||||
Directory.CreateDirectory(_configurationDirectoryPath);
|
||||
}
|
||||
|
||||
return _configurationDirectoryPath;
|
||||
}
|
||||
set
|
||||
{
|
||||
_configurationDirectoryPath = value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user