diff --git a/trunk/src/com/jpexs/decompiler/flash/SWF.java b/trunk/src/com/jpexs/decompiler/flash/SWF.java index 2fc020908..b2c2523f3 100644 --- a/trunk/src/com/jpexs/decompiler/flash/SWF.java +++ b/trunk/src/com/jpexs/decompiler/flash/SWF.java @@ -448,10 +448,11 @@ public final class SWF implements TreeItem { } public String getShortFileName() { - if (file == null) { + String title = getFileTitle(); + if (title == null) { return ""; } - return new File(file).getName(); + return new File(title).getName(); } private void findFileAttributes() { diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/Main.java b/trunk/src/com/jpexs/decompiler/flash/gui/Main.java index 1004bb5e5..7028c43f2 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/Main.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/Main.java @@ -53,6 +53,7 @@ import java.util.Calendar; import java.util.Date; import java.util.List; import java.util.Locale; +import java.util.Map.Entry; import java.util.logging.ConsoleHandler; import java.util.logging.FileHandler; import java.util.logging.Formatter; @@ -231,8 +232,9 @@ public class Main { Stopwatch sw = Stopwatch.startNew(); if (bundle != null) { result.isBundle = true; - result.name = sourceInfo.getFileTitleOrName(); - for (ReReadableInputStream stream : bundle.getAll().values()) { + result.name = new File(sourceInfo.getFileTitleOrName()).getName(); + for (Entry streamEntry : bundle.getAll().entrySet()) { + InputStream stream = streamEntry.getValue(); stream.reset(); SWF swf = new SWF(stream, new ProgressListener() { @Override @@ -240,6 +242,8 @@ public class Main { startWork(AppStrings.translate("work.reading.swf"), p); } }, Configuration.parallelSpeedUp.get()); + swf.file = sourceInfo.getFile(); + swf.fileTitle = streamEntry.getKey(); result.add(swf); } } else { @@ -249,6 +253,8 @@ public class Main { startWork(AppStrings.translate("work.reading.swf"), p); } }, Configuration.parallelSpeedUp.get()); + swf.file = sourceInfo.getFile(); + swf.fileTitle = sourceInfo.getFileTitle(); result.add(swf); } @@ -271,8 +277,6 @@ public class Main { logger.log(Level.INFO, "Height: {0}", height); swf.swfList = result; - swf.file = sourceInfo.getFile(); - swf.fileTitle = sourceInfo.getFileTitle(); swf.addEventListener(new EventListener() { @Override public void handleEvent(String event, Object data) { diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/TagTreeModel.java b/trunk/src/com/jpexs/decompiler/flash/gui/TagTreeModel.java index 98d051d8d..0b71524a7 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/TagTreeModel.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/TagTreeModel.java @@ -76,7 +76,7 @@ public class TagTreeModel implements TreeModel { List objs = new ArrayList<>(); objs.addAll(swf.tags); ClassesListTreeModel classTreeModel = new ClassesListTreeModel(swf); - SWFNode swfNode = new SWFNode(swf, new File(swf.getFileTitle()).getName()); + SWFNode swfNode = new SWFNode(swf, swf.getShortFileName()); swfNode.list = createTagList(objs, null, swf, swfNode, classTreeModel); swfToSwfNode.put(swf, swfNode); return swfNode;