Commit ab480a24 authored by Guus der Kinderen's avatar Guus der Kinderen

Merge pull request #268 from guusdk/OF-930

OF-930 & OF-935 Fixes
parents 9c8d8887 fdd5bcfe
This diff is collapsed.
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<html> <html>
<head> <head>
<title>Openfire: Database Installation Guide</title> <title>Openfire: Customization Guide</title>
<link href="style.css" rel="stylesheet" type="text/css"> <link href="style.css" rel="stylesheet" type="text/css">
</head> </head>
<body> <body>
......
...@@ -25,6 +25,9 @@ import org.apache.tools.ant.BuildException; ...@@ -25,6 +25,9 @@ import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.Project; import org.apache.tools.ant.Project;
import java.io.File; import java.io.File;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
/** /**
* A simple ant task to return the sub directories of a given dir as a comma delimited string. * A simple ant task to return the sub directories of a given dir as a comma delimited string.
...@@ -89,6 +92,12 @@ public class SubDirInfoTask extends Task { ...@@ -89,6 +92,12 @@ public class SubDirInfoTask extends Task {
public void execute() throws BuildException { public void execute() throws BuildException {
// Get the siblings of the given directory, add sub directory names to the property // Get the siblings of the given directory, add sub directory names to the property
List excepts;
if (except != null) {
excepts = Arrays.asList( except.split( getDelimiter() ) );
} else {
excepts = Collections.EMPTY_LIST;
}
File[] subdirs = dir.listFiles(); File[] subdirs = dir.listFiles();
StringBuffer buf = new StringBuffer(); StringBuffer buf = new StringBuffer();
String value = null; String value = null;
...@@ -108,7 +117,7 @@ public class SubDirInfoTask extends Task { ...@@ -108,7 +117,7 @@ public class SubDirInfoTask extends Task {
add = true; add = true;
} }
} }
if (add && !subdir.getName().equals(except)) { if (add && !excepts.contains(subdir.getName())) {
buf.append(sep).append(subdir.getName()); buf.append(sep).append(subdir.getName());
sep = getDelimiter(); sep = getDelimiter();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment