DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=38973>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ· INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=38973 Summary: Expand.jar protected void extractFile is coded wrong. Product: Ant Version: 1.6.5 Platform: All OS/Version: other Status: NEW Severity: normal Priority: P1 Component: Core tasks AssignedTo: dev@ant.apache.org ReportedBy: [EMAIL PROTECTED] In the code below from extractFile method of Expand.jar I made the changes for the fix. Search for ERROR and you will find the changes in two places. PatternSet p = (PatternSet) patternsets.elementAt(v); String[] incls = p.getIncludePatterns(getProject()); if (incls == null || incls.length == 0) { // no include pattern implicitly means includes="**" incls = new String[] {"**"}; } for (int w = 0; w < incls.length; w++) { String pattern = incls[w].replace('/', File.separatorChar) .replace('\\', File.separatorChar); if (pattern.endsWith(File.separator)) { pattern += "**"; } included = SelectorUtils.matchPath(pattern, name); if (included) { break; } } if (!included) { break; ERROR ----> Should be Continue!, because if not found it should continue at the tope of the loop. } String[] excls = p.getExcludePatterns(getProject()); if (excls != null) { for (int w = 0; w < excls.length; w++) { String pattern = excls[w] .replace('/', File.separatorChar) .replace('\\', File.separatorChar); if (pattern.endsWith(File.separator)) { pattern += "**"; } included = !(SelectorUtils.matchPath(pattern, name)); if (!included) { break; } } } ERROR -----> these three lines should be added - so that we don't search through the other patterns if it matches the first one. if (included) { break; } ERROR ---->Done Adding } if (!included) { //Do not process this file return; } } -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]