Commit 82e3a719 authored by Bill Lynch's avatar Bill Lynch Committed by bill

Slight improvement


git-svn-id: http://svn.igniterealtime.org/svn/repos/messenger/trunk@512 b35dd754-fafc-0310-a699-88a17e54d16e
parent dee3550e
......@@ -80,6 +80,7 @@ public class SubDirInfoTask extends Task {
// Get the siblings of the given directory, add sub directory names to the property
File[] subdirs = dir.listFiles();
StringBuffer buf = new StringBuffer();
String value = null;
String sep = "";
for (int i=0; i<subdirs.length; i++) {
File subdir = subdirs[i];
......@@ -100,12 +101,17 @@ public class SubDirInfoTask extends Task {
sep = getDelimiter();
}
}
if (buf.length() == 0) {
if (buf.length() > 0) {
value = buf.toString();
}
if (value == null) {
log("No tokens found.", Project.MSG_DEBUG);
}
if (buf.length() > 0) {
log("Setting property '" + property + "' to " + buf.toString(), Project.MSG_DEBUG);
getProject().setProperty(property, buf.toString());
else {
log("Setting property '" + property + "' to " + value, Project.MSG_DEBUG);
if (buf.length() >= 0) {
getProject().setProperty(property, value);
}
}
}
}
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