Fixed: #2268 AS3 script export with embedded assets fails (_assets dir not exists)

when no other than sprite assets exist
This commit is contained in:
Jindra Petřík
2024-08-08 19:27:14 +02:00
parent a88cac9b4b
commit eaf14956b7
2 changed files with 5 additions and 0 deletions
@@ -571,6 +571,7 @@ public class AS3ScriptExporter {
}
if (!spriteTagList.isEmpty()) {
new RetryTask(() -> {
Path.createDirectorySafe(new File(ASSETS_DIR));
try (FileOutputStream fos = new FileOutputStream(ASSETS_DIR + "/assets.swf")) {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
SWFOutputStream sos2 = new SWFOutputStream(baos, swf.version, swf.getCharset());