From 7f66d1282a49ec8d6a5260aab05aa0a49d931b30 Mon Sep 17 00:00:00 2001 From: Pacien TRAN-GIRARD Date: Sat, 24 May 2014 21:45:47 +0200 Subject: Fix wrong extension --- src/esieequest/view/app/UserInterface.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/esieequest/view/app/UserInterface.java b/src/esieequest/view/app/UserInterface.java index 6e2cb08..37dde80 100644 --- a/src/esieequest/view/app/UserInterface.java +++ b/src/esieequest/view/app/UserInterface.java @@ -69,7 +69,7 @@ abstract class UserInterface implements Viewable, ActionListener { private static final String SOUND_EXT = ".ogg"; private static final String SAVE_LABEL = "ESIEEquest Game"; - private static final String SAVE_EXT = ".eqg"; + private static final String SAVE_EXT = "eqg"; private GameEngine gameEngine; @@ -567,7 +567,7 @@ abstract class UserInterface implements Viewable, ActionListener { final int option = fileChooser.showSaveDialog(this.layout); if (option == JFileChooser.APPROVE_OPTION) { final String path = fileChooser.getSelectedFile().getPath(); - final String filePath = path.endsWith(UserInterface.SAVE_EXT) ? path : path + final String filePath = path.endsWith(UserInterface.SAVE_EXT) ? path : path + "." + UserInterface.SAVE_EXT; this.gameEngine.interpret(actionEvent.getActionCommand() + Text.COMMAND_SEPARATOR + filePath); -- cgit v1.2.3