Browse Source

fix missing directory

Krzysztof Krysiński 2 weeks ago
parent
commit
992e1e78e2
1 changed files with 5 additions and 0 deletions
  1. 5 0
      src/PixiEditor.Platform.Steam/SteamIdentityProvider.cs

+ 5 - 0
src/PixiEditor.Platform.Steam/SteamIdentityProvider.cs

@@ -57,6 +57,11 @@ public class SteamIdentityProvider : IIdentityProvider
 
 
         string cache = Path.Combine(Path.GetTempPath(), "PixiEditor", $"SteamAvatar_{id.m_SteamID}.png");
         string cache = Path.Combine(Path.GetTempPath(), "PixiEditor", $"SteamAvatar_{id.m_SteamID}.png");
 
 
+        if (!Directory.Exists(Path.GetDirectoryName(cache)))
+        {
+            Directory.CreateDirectory(Path.GetDirectoryName(cache)!);
+        }
+
         bool cacheExists = File.Exists(cache);
         bool cacheExists = File.Exists(cache);
 
 
         if (cacheExists)
         if (cacheExists)