From 3488cfecbd54eaaf917d853664f68cac84d472e9 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sun, 29 Dec 2013 09:12:29 -0500 Subject: make lazy loaded paths more nimble --- MediaBrowser.Common/Configuration/ConfigurationHelper.cs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'MediaBrowser.Common/Configuration/ConfigurationHelper.cs') diff --git a/MediaBrowser.Common/Configuration/ConfigurationHelper.cs b/MediaBrowser.Common/Configuration/ConfigurationHelper.cs index 1f86c5c02..64c2e87de 100644 --- a/MediaBrowser.Common/Configuration/ConfigurationHelper.cs +++ b/MediaBrowser.Common/Configuration/ConfigurationHelper.cs @@ -42,6 +42,8 @@ namespace MediaBrowser.Common.Configuration // If the file didn't exist before, or if something has changed, re-save if (buffer == null || !buffer.SequenceEqual(newBytes)) { + Directory.CreateDirectory(Path.GetDirectoryName(path)); + // Save it after load in case we got new items File.WriteAllBytes(path, newBytes); } -- cgit v1.2.3