|
|
@ -12,11 +12,16 @@ namespace Emby.Server.Implementations.AppBase
|
|
|
|
/// <summary>
|
|
|
|
/// <summary>
|
|
|
|
/// Initializes a new instance of the <see cref="BaseApplicationPaths"/> class.
|
|
|
|
/// Initializes a new instance of the <see cref="BaseApplicationPaths"/> class.
|
|
|
|
/// </summary>
|
|
|
|
/// </summary>
|
|
|
|
protected BaseApplicationPaths(string programDataPath, string appFolderPath, string logDirectoryPath)
|
|
|
|
protected BaseApplicationPaths(
|
|
|
|
|
|
|
|
string programDataPath,
|
|
|
|
|
|
|
|
string appFolderPath,
|
|
|
|
|
|
|
|
string logDirectoryPath = null,
|
|
|
|
|
|
|
|
string configurationDirectoryPath = null)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
ProgramDataPath = programDataPath;
|
|
|
|
ProgramDataPath = programDataPath;
|
|
|
|
ProgramSystemPath = appFolderPath;
|
|
|
|
ProgramSystemPath = appFolderPath;
|
|
|
|
LogDirectoryPath = logDirectoryPath;
|
|
|
|
LogDirectoryPath = logDirectoryPath;
|
|
|
|
|
|
|
|
ConfigurationDirectoryPath = configurationDirectoryPath;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public string ProgramDataPath { get; private set; }
|
|
|
|
public string ProgramDataPath { get; private set; }
|
|
|
@ -134,6 +139,11 @@ namespace Emby.Server.Implementations.AppBase
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
|
|
/// The _config directory
|
|
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
|
|
private string _configurationDirectoryPath;
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// <summary>
|
|
|
|
/// Gets the path to the application configuration root directory
|
|
|
|
/// Gets the path to the application configuration root directory
|
|
|
|
/// </summary>
|
|
|
|
/// </summary>
|
|
|
@ -142,7 +152,18 @@ namespace Emby.Server.Implementations.AppBase
|
|
|
|
{
|
|
|
|
{
|
|
|
|
get
|
|
|
|
get
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return Path.Combine(ProgramDataPath, "config");
|
|
|
|
if (string.IsNullOrEmpty(_configurationDirectoryPath))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
_configurationDirectoryPath = Path.Combine(ProgramDataPath, "config");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Directory.CreateDirectory(_configurationDirectoryPath);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return _configurationDirectoryPath;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
set
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
_configurationDirectoryPath = value;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|