Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge branch 'JENKINS-17545', changing implementation fix for JENKINS…
…-17545 by using lanfeust69 suggestion in PR #15
  • Loading branch information
fcamblor committed Jun 28, 2013
2 parents ad19835 + c80e89e commit 2938f22
Showing 1 changed file with 4 additions and 2 deletions.
Expand Up @@ -4,6 +4,7 @@
import hudson.model.Saveable;
import hudson.plugins.scm_sync_configuration.JenkinsFilesHelper;
import org.apache.tools.ant.DirectoryScanner;
import org.springframework.util.AntPathMatcher;

import java.io.File;
import java.util.Arrays;
Expand All @@ -22,8 +23,9 @@ public boolean matches(Saveable saveable, File file) {
return false;
}
String filePathRelativeToHudsonRoot = JenkinsFilesHelper.buildPathRelativeToHudsonRoot(file);
for(String matchingFile : matchingFilesFrom(Hudson.getInstance().getRootDir())) {
if(matchingFile.equals(filePathRelativeToHudsonRoot)){
AntPathMatcher matcher = new AntPathMatcher();
for(String pattern : includesPatterns) {
if(matcher.match(pattern, filePathRelativeToHudsonRoot)){
return true;
}
}
Expand Down

0 comments on commit 2938f22

Please sign in to comment.