version 0.4.9.6: fix insert failure when default file was removed from disk but not... 0.4.9.6
authorDavid ‘Bombe’ Roden <bombe@freenetproject.org>
Wed, 5 Mar 2008 20:52:25 +0000 (20:52 +0000)
committerDavid ‘Bombe’ Roden <bombe@freenetproject.org>
Wed, 5 Mar 2008 20:52:25 +0000 (20:52 +0000)
src/de/todesbaum/jsite/i18n/jSite.properties
src/de/todesbaum/jsite/i18n/jSite_de.properties
src/de/todesbaum/jsite/main/Main.java
src/de/todesbaum/jsite/main/Version.java

index 08ecf4e..75e41c8 100644 (file)
@@ -125,6 +125,7 @@ jsite.project-files.replacement.edition-range=Range
 jsite.project-files.replacement.edition-range.tooltip=Also replace $[EDITION+1], $[EDITION+2]\u2026
 jsite.project-files.scan-error=<html><b>Error scanning files</b><br><br>Either the directory of the project does not exist<br>or some files/directories in it are notaccessible.<br>Please go back and select the correct directory.</html>
 jsite.project-files.empty-index=<html><b>No default file</b><br><br>You did not specify a default file for this project.<br>While it is possible to insert a project without a default<br>file you should specify one to ease browsing.</html>
+jsite.project-files.index-missing=<html>Your default file is missing</b><br><br>A default file was previously specified but it<br>does not exist anymore! Please select<br>a new default file in the list of files.</html>
 jsite.project-files.container-index=<html><b>Default file in container</b><br><br>Your default file was placed in a container!<br>This might make other people shun your page.</html>
 jsite.project-files.index-not-html=<html><b>Default file is not HTML</b><br><br>Your default file does not have the MIME type "text/html"!<br>Loading your Freesite in a browser may give unexpected results.</html>
 jsite.project-files.no-node-running=<html><b>Node is not running</b><br><br>You can not insert a project if your node is not running.<br>Please start your node and try again.</html>
index b13dd28..f229baa 100644 (file)
@@ -125,6 +125,7 @@ jsite.project-files.replacement.edition-range=Reichweite
 jsite.project-files.replacement.edition-range.tooltip=Ersetzt auch $[EDITION+1], $[EDITION+2], usw.
 jsite.project-files.scan-error=<html><b>Fehler beim Einlesen der Dateien</b><br><br>Entweder existiert das Projektverzeichnis nicht,<br>oder einige Dateien und/oder Verzeichnisse sind nicht lesbar!<br>Bitte gehen Sie zurück und beheben Sie den Fehler!</html>
 jsite.project-files.empty-index=<html><b>Keine Index-Datei gewählt</b><br><br>Sie haben keine Index-Datei für das Projekt angegeben.<br>Obwohl es möglich ist, das zu machen, sollten Sie doch<br>eine Index-Datei angeben, um das Browsen zu erleichtern.</html>
+jsite.project-files.index-missing=<html><b>Index-Datei fehlt!</b><br><br>Sie haben eine Index-Datei für das Project gewählt,<br>aber diese Index-Datei existiert nicht mehr!<br>Bitte wählen Sie eine neue Index-Datei.</html>
 jsite.project-files.container-index=<html><b>Index-Datei in Container</b><br><br>Ihre Index-Datei befindet sich in einem Container! Das kann<br>dazu führen, dass Ihre Freesite von anderen Leuten gemieden wird.</html>
 jsite.project-files.index-not-html=<html><b>Index-Datei ist kein HTML</b><br><br>Ihre Index-Datei hat nicht den MIME-Typ "text/html"!<br>Das kann beim Besuch Ihrer Freesite zu<br>unerwarteten Ergebnissen führen.</html>
 jsite.project-files.no-node-running=<html><b>Der Node läuft nicht</b><br><br>Sie können das Projekt nicht einfügen, wenn<br>Ihr Node nicht läuft. Bitte starten Sie Ihren Node<br>und probieren Sie es erneut.</html> 
index bfb5ef3..230f2ec 100644 (file)
@@ -21,6 +21,7 @@ package de.todesbaum.jsite.main;
 
 import java.awt.event.ActionEvent;
 import java.awt.event.ActionListener;
+import java.io.File;
 import java.io.IOException;
 import java.text.MessageFormat;
 import java.util.HashMap;
@@ -320,6 +321,12 @@ public class Main implements ActionListener, ListSelectionListener, WizardListen
                                if (JOptionPane.showConfirmDialog(wizard, I18n.getMessage("jsite.project-files.empty-index"), null, JOptionPane.OK_CANCEL_OPTION, JOptionPane.WARNING_MESSAGE) != JOptionPane.OK_OPTION) {
                                        return;
                                }
+                       } else {
+                               File indexFile = new File(project.getLocalPath(), project.getIndexFile());
+                               if (!indexFile.exists()) {
+                                       JOptionPane.showMessageDialog(wizard, I18n.getMessage("jsite.project-files.index-missing"), null, JOptionPane.ERROR_MESSAGE);
+                                       return;
+                               }
                        }
                        if (!project.getFileOption(project.getIndexFile()).getContainer().equals("")) {
                                if (JOptionPane.showConfirmDialog(wizard, I18n.getMessage("jsite.project-files.container-index"), null, JOptionPane.OK_CANCEL_OPTION, JOptionPane.WARNING_MESSAGE) != JOptionPane.OK_OPTION) {
index 0deb7c8..7c36c9e 100644 (file)
@@ -25,7 +25,7 @@ package de.todesbaum.jsite.main;
  */
 public class Version {
 
-       private static final String VERSION = "0.4.9.5";
+       private static final String VERSION = "0.4.9.6";
 
        public static final String getVersion() {
                return VERSION;