Browse Source

Fixed save loop

flabbet 3 years ago
parent
commit
dbc202f5d6
1 changed files with 1 additions and 1 deletions
  1. 1 1
      PixiEditor/Models/IO/Exporter.cs

+ 1 - 1
PixiEditor/Models/IO/Exporter.cs

@@ -56,7 +56,7 @@ namespace PixiEditor.Models.IO
                 var bitmap = document.Renderer.FinalBitmap;
                 var bitmap = document.Renderer.FinalBitmap;
                 SaveAs(encodersFactory[chosenFormat](), path, bitmap.PixelWidth, bitmap.PixelHeight, bitmap);
                 SaveAs(encodersFactory[chosenFormat](), path, bitmap.PixelWidth, bitmap.PixelHeight, bitmap);
             }
             }
-            else if(File.Exists(path))
+            else if(Directory.Exists(Path.GetDirectoryName(path)))
             {
             {
                 Parser.PixiParser.Serialize(ParserHelpers.ToSerializable(document), path);
                 Parser.PixiParser.Serialize(ParserHelpers.ToSerializable(document), path);
             }
             }