Sfoglia il codice sorgente

fix remote image service not ensuring save directory existence

Luke Pulverenti 11 anni fa
parent
commit
d813490363
1 ha cambiato i file con 2 aggiunte e 0 eliminazioni
  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))