Skip to content

Commit

Permalink
Fixed [JENKINS-11568]
Browse files Browse the repository at this point in the history
  • Loading branch information
gboissinot committed Nov 6, 2011
1 parent 2b44cb1 commit 31175ee
Showing 1 changed file with 9 additions and 2 deletions.
Expand Up @@ -204,6 +204,15 @@ private Map<String, FileInfo> getFileInfo(String path, String includes, String e
FileSet fileSet = Util.createFileSet(new File(path), includes, excludes);
for (Iterator it = fileSet.iterator(); it.hasNext();) {
FileResource fileResource = (FileResource) it.next();
processFileResource(log, result, fileResource);
}
return result;
}

private void processFileResource(FSTriggerLog log, Map<String, FileInfo> result, FileResource fileResource) throws FSTriggerException {
if (!fileResource.isExists()) {
log.info(String.format("\nThe file '%s' doesn't exist anymore ", fileResource.getFile().getPath()));
} else {
String currentMd5;
try {
FileInputStream fis = new FileInputStream(fileResource.getFile());
Expand All @@ -216,9 +225,7 @@ private Map<String, FileInfo> getFileInfo(String path, String includes, String e
}
FileInfo fileInfo = new FileInfo(currentMd5, fileResource.getLastModified());
result.put(fileResource.getFile().getAbsolutePath(), fileInfo);

}
return result;
}

@Override
Expand Down

0 comments on commit 31175ee

Please sign in to comment.