Explorar o código

fix remote image service not ensuring save directory existence

Luke Pulverenti %!s(int64=11) %!d(string=hai) anos
pai
achega
d813490363
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      MediaBrowser.Api/Images/RemoteImageService.cs

+ 2 - 0
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))