From 7615cdc963cdfb16313e8704c047fd4108510742 Mon Sep 17 00:00:00 2001 From: Mark Monteiro Date: Sun, 26 Apr 2020 15:30:37 -0400 Subject: Ensure metadata path is created on app startup, and also each time it is updated --- .../Configuration/ServerConfigurationManager.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'Emby.Server.Implementations/Configuration/ServerConfigurationManager.cs') 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 /// /// Updates the metadata path. /// + /// If the directory does not exist, and the caller does not have the required permission to create it. + /// If there is a custom path transcoding path specified, but it is invalid. + /// If the directory does not exist, and it also could not be created. private void UpdateMetadataPath() { ((ServerApplicationPaths)ApplicationPaths).InternalMetadataPath = string.IsNullOrWhiteSpace(Configuration.MetadataPath) - ? Path.Combine(ApplicationPaths.ProgramDataPath, "metadata") + ? ApplicationPaths.DefaultInternalMetadataPath : Configuration.MetadataPath; + Directory.CreateDirectory(ApplicationPaths.InternalMetadataPath); } /// -- cgit v1.2.3