Issue #232 Automatically add .swf to filename

This commit is contained in:
Jindra Petk
2013-07-19 13:09:16 +02:00
parent c8f1605b62
commit 99a6ae0fa6

View File

@@ -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;