Skip to content

Commit

Permalink
Fix JENKINS-12865
Browse files Browse the repository at this point in the history
  • Loading branch information
gboissinot committed Feb 23, 2012
1 parent b9e2cd5 commit 1032c41
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Expand Up @@ -10,6 +10,7 @@
import org.jenkinsci.lib.xtrigger.XTriggerLog;
import org.jenkinsci.plugins.fstrigger.triggers.FileNameTriggerInfo;

import java.io.File;
import java.io.IOException;
import java.io.Serializable;
import java.util.Map;
Expand Down Expand Up @@ -38,7 +39,11 @@ public FilePath computedFile(Node node, AbstractProject project, final FileNameT
final Map<String, String> envVars = varsRetriever.getPollingEnvVars(project, node);
return node.getRootPath().act(new Callable<FilePath, XTriggerException>() {
public FilePath call() throws XTriggerException {
return new FilePath(new FSTriggerFileNameRetriever(fileInfo, log, envVars).getFile());
File file = new FSTriggerFileNameRetriever(fileInfo, log, envVars).getFile();
if (file == null) {
return null;
}
return new FilePath(file);
}
});

Expand Down
Expand Up @@ -45,6 +45,7 @@ public FSTriggerFileNameRetriever(FileNameTriggerInfo fileInfo, XTriggerLog log,
public File getFile() throws XTriggerException {

if (fileInfo.getFilePathPattern() == null) {
log.info("A file pattern must be set.");
return null;
}

Expand Down

0 comments on commit 1032c41

Please sign in to comment.