From 99a6ae0fa65cd0f60a704a06906da22a50c38afd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jindra=20Pet=F8=EDk?= Date: Fri, 19 Jul 2013 13:09:16 +0200 Subject: [PATCH] Issue #232 Automatically add .swf to filename --- trunk/src/com/jpexs/decompiler/flash/gui/Main.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/Main.java b/trunk/src/com/jpexs/decompiler/flash/gui/Main.java index 82aecee28..ffd2b8dc0 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/Main.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/Main.java @@ -288,7 +288,11 @@ public class Main { if (returnVal == JFileChooser.APPROVE_OPTION) { File file = Helper.fixDialogFile(fc.getSelectedFile()); try { - Main.saveFile(file.getAbsolutePath()); + String fileName = file.getAbsolutePath(); + if (!fileName.toLowerCase().endsWith(".swf")) { + fileName += ".swf"; + } + Main.saveFile(fileName); Configuration.setConfig("lastSaveDir", file.getParentFile().getAbsolutePath()); maskURL = null; return true;