From 3804c5f444833eee2639d743e08e5c8aa45cb171 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Thu, 22 Mar 2012 21:23:19 +0100 Subject: [PATCH] Only ask for confirmation if the location of the configuration changed. --- src/de/todesbaum/jsite/main/Main.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/de/todesbaum/jsite/main/Main.java b/src/de/todesbaum/jsite/main/Main.java index 8dd2e55..c2841d0 100644 --- a/src/de/todesbaum/jsite/main/Main.java +++ b/src/de/todesbaum/jsite/main/Main.java @@ -605,7 +605,7 @@ public class Main implements ActionListener, ListSelectionListener, WizardListen JOptionPane.showMessageDialog(wizard, I18n.getMessage("jsite.project.warning.use-clipboard-now")); } if (JOptionPane.showConfirmDialog(wizard, I18n.getMessage("jsite.quit.question"), I18n.getMessage("jsite.quit.question.title"), JOptionPane.OK_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE) == JOptionPane.OK_OPTION) { - if (isOverwritingConfiguration()) { + if (isOverwritingConfiguration() && !originalLocation.equals(configuration.getConfigurationDirectory())) { int overwriteConfigurationAnswer = JOptionPane.showConfirmDialog(wizard, MessageFormat.format(I18n.getMessage("jsite.quit.overwrite-configuration"), configuration.getConfigurationLocator().getFile(configuration.getConfigurationDirectory())), I18n.getMessage("jsite.quit.overwrite-configuration.title"), JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.WARNING_MESSAGE); if (overwriteConfigurationAnswer == JOptionPane.YES_OPTION) { if (saveConfiguration()) { -- 2.7.4