From d81349036337c423f5826c519fc38badf2ad033f Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Fri, 15 Nov 2013 10:11:35 -0500 Subject: [PATCH] fix remote image service not ensuring save directory existence --- MediaBrowser.Api/Images/RemoteImageService.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/MediaBrowser.Api/Images/RemoteImageService.cs b/MediaBrowser.Api/Images/RemoteImageService.cs index f92d9d581b..1084e99d07 100644 --- a/MediaBrowser.Api/Images/RemoteImageService.cs +++ b/MediaBrowser.Api/Images/RemoteImageService.cs @@ -359,6 +359,8 @@ namespace MediaBrowser.Api.Images var fullCachePath = GetFullCachePath(urlHash + "." + ext); + Directory.CreateDirectory(Path.GetDirectoryName(fullCachePath)); + using (var stream = result.Content) { using (var filestream = _fileSystem.GetFileStream(fullCachePath, FileMode.Create, FileAccess.Write, FileShare.Read, true))