aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/Configuration/ServerConfigurationManager.cs
diff options
context:
space:
mode:
authorJoshua M. Boniface <joshua@boniface.me>2020-04-26 16:02:09 -0400
committerGitHub <noreply@github.com>2020-04-26 16:02:09 -0400
commit00d8983d7cec0594efac8d85a927dba3c3391bdf (patch)
treea76f7aa0b0d99318a1ea161125708c819189441a /Emby.Server.Implementations/Configuration/ServerConfigurationManager.cs
parent4fa6d1ccee111c0417789e22d0756b5d1118c171 (diff)
parent7615cdc963cdfb16313e8704c047fd4108510742 (diff)
Merge pull request #2990 from mark-monteiro/create-missing-folders
Create Missing Data Folders
Diffstat (limited to 'Emby.Server.Implementations/Configuration/ServerConfigurationManager.cs')
-rw-r--r--Emby.Server.Implementations/Configuration/ServerConfigurationManager.cs6
1 files changed, 5 insertions, 1 deletions
diff --git a/Emby.Server.Implementations/Configuration/ServerConfigurationManager.cs b/Emby.Server.Implementations/Configuration/ServerConfigurationManager.cs
index 0ff70deca..a6eaf2d0a 100644
--- a/Emby.Server.Implementations/Configuration/ServerConfigurationManager.cs
+++ b/Emby.Server.Implementations/Configuration/ServerConfigurationManager.cs
@@ -67,11 +67,15 @@ namespace Emby.Server.Implementations.Configuration
/// <summary>
/// Updates the metadata path.
/// </summary>
+ /// <exception cref="UnauthorizedAccessException">If the directory does not exist, and the caller does not have the required permission to create it.</exception>
+ /// <exception cref="NotSupportedException">If there is a custom path transcoding path specified, but it is invalid.</exception>
+ /// <exception cref="IOException">If the directory does not exist, and it also could not be created.</exception>
private void UpdateMetadataPath()
{
((ServerApplicationPaths)ApplicationPaths).InternalMetadataPath = string.IsNullOrWhiteSpace(Configuration.MetadataPath)
- ? Path.Combine(ApplicationPaths.ProgramDataPath, "metadata")
+ ? ApplicationPaths.DefaultInternalMetadataPath
: Configuration.MetadataPath;
+ Directory.CreateDirectory(ApplicationPaths.InternalMetadataPath);
}
/// <summary>