From cc27c76e3437990ca86a5832109b72b74fc98e79 Mon Sep 17 00:00:00 2001 From: "honfika@gmail.com" Date: Sat, 26 Dec 2015 15:30:17 +0100 Subject: [PATCH] #1121 Ability to save binary data by its name --- .../jpexs/decompiler/flash/exporters/BinaryDataExporter.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/BinaryDataExporter.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/BinaryDataExporter.java index b76785474..5d6c8adf6 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/BinaryDataExporter.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/BinaryDataExporter.java @@ -22,6 +22,7 @@ import com.jpexs.decompiler.flash.RetryTask; import com.jpexs.decompiler.flash.exporters.settings.BinaryDataExportSettings; import com.jpexs.decompiler.flash.tags.DefineBinaryDataTag; import com.jpexs.decompiler.flash.tags.Tag; +import com.jpexs.helpers.Helper; import com.jpexs.helpers.Path; import java.io.BufferedOutputStream; import java.io.File; @@ -65,10 +66,8 @@ public class BinaryDataExporter { evl.handleExportingEvent("binarydata", currentIndex, count, t.getName()); } - int characterID = bdt.getCharacterId(); - String ext = bdt.innerSwf == null ? ".bin" : ".swf"; - final File file = new File(outdir + File.separator + characterID + ext); + final File file = new File(outdir + File.separator + Helper.makeFileName(bdt.getCharacterExportFileName() + ext)); new RetryTask(() -> { try (OutputStream fos = new BufferedOutputStream(new FileOutputStream(file))) { fos.write(bdt.binaryData.getRangeData());