diff --git a/CHANGELOG.md b/CHANGELOG.md index fbc6f192a..c2414fbb9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ All notable changes to this project will be documented in this file. - Native sound export format for ADPCM compression is FLV - [#1923] Wrong cyclic tag detection causing hidden sprites - Ctrl + G shortcut for tag list view +- Uncompressed FLA (XFL) export creates a directory ### Changed - [#1913] SVG export/import of shapes - shape exact position (bounds) is retained diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/xfl/XFLConverter.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/xfl/XFLConverter.java index 9eb912d23..148e64fd6 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/xfl/XFLConverter.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/xfl/XFLConverter.java @@ -146,6 +146,7 @@ import java.io.FileOutputStream; import java.io.IOException; import java.io.StringReader; import java.io.StringWriter; +import java.nio.file.Paths; import java.util.ArrayList; import java.util.Arrays; import java.util.Date; @@ -3557,16 +3558,25 @@ public class XFLConverter { if (!useAS3 && flaVersion.minASVersion() > 2) { throw new IllegalArgumentException("FLA version " + flaVersion + " does not support AS1/2"); - } - File file = new File(outfile); - File outDir = file.getParentFile(); - Path.createDirectorySafe(outDir); + } + File file = new File(outfile); String baseName = swfFileName; File f = new File(baseName); baseName = f.getName(); if (baseName.contains(".")) { baseName = baseName.substring(0, baseName.lastIndexOf('.')); + } + + File outDir = file.getParentFile(); + if (!settings.compressed) { + outDir = new File(Path.combine(outDir.getAbsolutePath(), baseName)); + outfile = Path.combine(outDir.getAbsolutePath(), baseName + ".xfl"); + file = new File(outfile); } + + Path.createDirectorySafe(outDir); + + final HashMap files = new HashMap<>(); final HashMap datfiles = new HashMap<>(); HashMap characters = getCharacters(swf.getTags());