diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWFSourceInfo.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWFSourceInfo.java index f4d71db70..8be4bc490 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWFSourceInfo.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWFSourceInfo.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash; import com.jpexs.decompiler.flash.iggy.conversion.IggySwfBundle; @@ -35,10 +36,16 @@ public class SWFSourceInfo { private final String fileTitle; + private final boolean detectBundle; + public SWFSourceInfo(InputStream inputStream, String file, String fileTitle) { + this(inputStream, file, fileTitle, true); + } + public SWFSourceInfo(InputStream inputStream, String file, String fileTitle, boolean detectBundle) { this.inputStream = inputStream; this.file = file; this.fileTitle = fileTitle; + this.detectBundle = detectBundle; } public InputStream getInputStream() { @@ -77,7 +84,7 @@ public class SWFSourceInfo { return false; } String extension = Path.getExtension(fileObj); - return extension == null || !(extension.equals(".swf") || extension.equals(".gfx")); + return (detectBundle) && (extension == null || !(extension.equals(".swf") || extension.equals(".gfx"))); } return false; } diff --git a/src/com/jpexs/decompiler/flash/console/CommandLineArgumentParser.java b/src/com/jpexs/decompiler/flash/console/CommandLineArgumentParser.java index 4ca26a8ad..0d3cebb25 100644 --- a/src/com/jpexs/decompiler/flash/console/CommandLineArgumentParser.java +++ b/src/com/jpexs/decompiler/flash/console/CommandLineArgumentParser.java @@ -3673,6 +3673,7 @@ public class CommandLineArgumentParser { File out; PrintWriter pw = new PrintWriter(System.out); boolean found = false; + boolean detectBundle = true; while (!args.isEmpty()) { String a = args.pop(); switch (a) { @@ -3688,13 +3689,16 @@ public class CommandLineArgumentParser { pw = new PrintWriter(out); } break; + case "-nobundle": + detectBundle = false; + break; default: SWFBundle bundle; String sfile = a; File file = new File(sfile); try { - SWFSourceInfo sourceInfo = new SWFSourceInfo(null, sfile, sfile); + SWFSourceInfo sourceInfo = new SWFSourceInfo(null, sfile, sfile, detectBundle); bundle = sourceInfo.getBundle(false, SearchMode.ALL); logger.log(Level.INFO, "Load file: {0}", sourceInfo.getFile());