浏览代码

Remove DirectoryExists

Krzysztof Krysiński 3 周之前
父节点
当前提交
643f70a995
共有 1 个文件被更改,包括 2 次插入8 次删除
  1. 2 8
      src/PixiEditor.AnimationRenderer.FFmpeg/FFMpegRenderer.cs

+ 2 - 8
src/PixiEditor.AnimationRenderer.FFmpeg/FFMpegRenderer.cs

@@ -34,10 +34,7 @@ public class FFMpegRenderer : IAnimationRenderer
         }
 
         string tempPath = Path.Combine(Path.GetTempPath(), "PixiEditor", "Rendering");
-        if (!Directory.Exists(tempPath))
-        {
-            Directory.CreateDirectory(tempPath);
-        }
+        Directory.CreateDirectory(tempPath);
 
         string paletteTempPath = Path.Combine(tempPath, "palette.png");
 
@@ -99,10 +96,7 @@ public class FFMpegRenderer : IAnimationRenderer
         }
 
         string tempPath = Path.Combine(Path.GetTempPath(), "PixiEditor", "Rendering");
-        if (!Directory.Exists(tempPath))
-        {
-            Directory.CreateDirectory(tempPath);
-        }
+        Directory.CreateDirectory(tempPath);
 
         string paletteTempPath = Path.Combine(tempPath, "palette.png");