aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/Configuration/ServerConfigurationManager.cs
diff options
context:
space:
mode:
authorMark Monteiro <marknr.monteiro@protonmail.com>2020-04-26 15:30:37 -0400
committerMark Monteiro <marknr.monteiro@protonmail.com>2020-04-26 15:51:41 -0400
commit7615cdc963cdfb16313e8704c047fd4108510742 (patch)
tree178d8b7c24c5aed10b92404dd51dcc483a0bcde9 /Emby.Server.Implementations/Configuration/ServerConfigurationManager.cs
parentcbd62e00a4f0f63e7cc725f3bce000e9ae3c6a0d (diff)
Ensure metadata path is created on app startup, and also each time it is updated
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>