Search for known files correctly.
authorDavid ‘Bombe’ Roden <bombe@freenetproject.org>
Sat, 17 Mar 2012 18:03:55 +0000 (19:03 +0100)
committerDavid ‘Bombe’ Roden <bombe@freenetproject.org>
Sat, 17 Mar 2012 18:03:55 +0000 (19:03 +0100)
src/de/todesbaum/jsite/gui/ProjectFilesPage.java

index 9514f5d..31ec6ae 100644 (file)
@@ -364,7 +364,14 @@ public class ProjectFilesPage extends TWizardPage implements ActionListener, Lis
                        Iterator<String> filenames = new HashSet<String>(project.getFileOptions().keySet()).iterator();
                        while (filenames.hasNext()) {
                                String filename = filenames.next();
-                               if (!files.contains(filename)) {
+                               boolean found = false;
+                               for (ScannedFile scannedFile : files) {
+                                       if (scannedFile.getFilename().equals(filename)) {
+                                               found = true;
+                                               break;
+                                       }
+                               }
+                               if (!found) {
                                        entriesToRemove.add(filename);
                                }
                        }