The name of the index file must not be empty if an index is to exist.
[jSite.git] / src / de / todesbaum / jsite / application / ProjectInserter.java
index 756e121..c7aa8ee 100644 (file)
@@ -429,7 +429,7 @@ public class ProjectInserter implements FileScannerListener, Runnable {
                        }
                }
                String indexFile = project.getIndexFile();
-               boolean hasIndexFile = (indexFile != null);
+               boolean hasIndexFile = (indexFile != null) && (indexFile.length() > 0);
                if (hasIndexFile && !project.getFileOption(indexFile).getContainer().equals("")) {
                        checkReport.addIssue("warning.container-index", false);
                }
@@ -439,7 +439,7 @@ public class ProjectInserter implements FileScannerListener, Runnable {
                }
                Map<String, FileOption> fileOptions = project.getFileOptions();
                Set<Entry<String, FileOption>> fileOptionEntries = fileOptions.entrySet();
-               boolean insert = false;
+               boolean insert = fileOptionEntries.isEmpty();
                for (Entry<String, FileOption> fileOptionEntry : fileOptionEntries) {
                        String fileName = fileOptionEntry.getKey();
                        FileOption fileOption = fileOptionEntry.getValue();