From: David ‘Bombe’ Roden Date: Sat, 17 Mar 2012 18:03:55 +0000 (+0100) Subject: Search for known files correctly. X-Git-Tag: 0.10-rc1~24 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=1e1c1eeb2dd778447e8dbe77d109975fda11f0c6;p=jSite.git Search for known files correctly. --- diff --git a/src/de/todesbaum/jsite/gui/ProjectFilesPage.java b/src/de/todesbaum/jsite/gui/ProjectFilesPage.java index 9514f5d..31ec6ae 100644 --- a/src/de/todesbaum/jsite/gui/ProjectFilesPage.java +++ b/src/de/todesbaum/jsite/gui/ProjectFilesPage.java @@ -364,7 +364,14 @@ public class ProjectFilesPage extends TWizardPage implements ActionListener, Lis Iterator filenames = new HashSet(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); } }