Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Kaegi2008-03-16 22:15:15 -0400
committerSimon Kaegi2008-03-16 22:15:15 -0400
commitdfd799b468c9d2eb2105ea6b26160e29ff93b53e (patch)
treebffcdd3ed3cfcfa6e04f0ba4f7f75b867f036bb3 /bundles/org.eclipse.equinox.p2.directorywatcher
parent2f9771901b4bde811ffcfec6d8899027cfaa002e (diff)
downloadrt.equinox.p2-dfd799b468c9d2eb2105ea6b26160e29ff93b53e.tar.gz
rt.equinox.p2-dfd799b468c9d2eb2105ea6b26160e29ff93b53e.tar.xz
rt.equinox.p2-dfd799b468c9d2eb2105ea6b26160e29ff93b53e.zip
Bug 222908 RepositoryListener filters out remove events
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.directorywatcher')
-rw-r--r--bundles/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/DirectoryWatcher.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/RepositoryListener.java16
2 files changed, 12 insertions, 6 deletions
diff --git a/bundles/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/DirectoryWatcher.java b/bundles/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/DirectoryWatcher.java
index c704d2c14..b621c986f 100644
--- a/bundles/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/DirectoryWatcher.java
+++ b/bundles/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/DirectoryWatcher.java
@@ -140,7 +140,7 @@ public class DirectoryWatcher {
File directory = directories[index];
File list[] = directory.listFiles();
if (list == null)
- return;
+ continue;
for (int i = 0; i < list.length; i++) {
File file = list[i];
// if this is a deletion marker then add to the list of pending deletions.
diff --git a/bundles/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/RepositoryListener.java b/bundles/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/RepositoryListener.java
index bf0e5b5cf..a4dcfff7d 100644
--- a/bundles/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/RepositoryListener.java
+++ b/bundles/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/RepositoryListener.java
@@ -167,16 +167,22 @@ public class RepositoryListener extends DirectoryChangeListener {
* @see org.eclipse.equinox.internal.provisional.p2.directorywatcher.IDirectoryChangeListener#added(java.io.File)
*/
public boolean added(File file) {
- currentFiles.put(file, new Long(file.lastModified()));
- return true;
+ if (isFeature(file) || isBundle(file)) {
+ currentFiles.put(file, new Long(file.lastModified()));
+ return true;
+ }
+ return false;
}
/* (non-Javadoc)
* @see org.eclipse.equinox.internal.provisional.p2.directorywatcher.IDirectoryChangeListener#changed(java.io.File)
*/
public boolean changed(File file) {
- currentFiles.put(file, new Long(file.lastModified()));
- return true;
+ if (isFeature(file) || isBundle(file)) {
+ currentFiles.put(file, new Long(file.lastModified()));
+ return true;
+ }
+ return false;
}
/* (non-Javadoc)
@@ -205,7 +211,7 @@ public class RepositoryListener extends DirectoryChangeListener {
* @see org.eclipse.equinox.internal.provisional.p2.directorywatcher.DirectoryChangeListener#isInterested(java.io.File)
*/
public boolean isInterested(File file) {
- return isFeature(file) || isBundle(file);
+ return true;
}
/* (non-Javadoc)

Back to the top