Skip to content
This repository has been archived by the owner on Jul 11, 2022. It is now read-only.

Commit

Permalink
[798006] Drift detection hangs on reading named pipes on filesystem
Browse files Browse the repository at this point in the history
Protect against drift detection on not "normal" files.
  • Loading branch information
jshaughn committed Apr 21, 2014
1 parent 4cfb114 commit 7e9ce1d
Showing 1 changed file with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,7 @@ public class DriftDetector implements Runnable {

private final DriftClient driftClient;

public DriftDetector(ScheduleQueue scheduleQueue,
ChangeSetManager changeSetMgr,
DriftClient driftClient) {
public DriftDetector(ScheduleQueue scheduleQueue, ChangeSetManager changeSetMgr, DriftClient driftClient) {
this.scheduleQueue = scheduleQueue;
this.changeSetMgr = changeSetMgr;
this.driftClient = driftClient;
Expand Down Expand Up @@ -212,10 +210,14 @@ private void generateDriftChangeSet(DriftDetectionSummary summary) throws IOExce
forEachFile(dir, new FilterFileVisitor(basedir, includes, excludes, new FileVisitor() {
@Override
public void visit(File file) {
if (file.canRead()) {
newFiles.add(file);
if (file.isFile()) {
if (file.canRead()) {
newFiles.add(file);
} else if (log.isDebugEnabled()) {
log.debug("Skipping " + file.getPath() + " as new file since it is not readable.");
}
} else if (log.isDebugEnabled()) {
log.debug("Skipping " + file.getPath() + " as new file since it is not readable.");
log.debug("Skipping " + file.getPath() + " as new file since it is not a normal file.");
}
}
}));
Expand Down

0 comments on commit 7e9ce1d

Please sign in to comment.