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 { ...@@ -80,6 +80,7 @@ public class SubDirInfoTask extends Task {
// 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
File[] subdirs = dir.listFiles(); File[] subdirs = dir.listFiles();
StringBuffer buf = new StringBuffer(); StringBuffer buf = new StringBuffer();
String value = null;
String sep = ""; String sep = "";
for (int i=0; i<subdirs.length; i++) { for (int i=0; i<subdirs.length; i++) {
File subdir = subdirs[i]; File subdir = subdirs[i];
...@@ -100,12 +101,17 @@ public class SubDirInfoTask extends Task { ...@@ -100,12 +101,17 @@ public class SubDirInfoTask extends Task {
sep = getDelimiter(); sep = getDelimiter();
} }
} }
if (buf.length() == 0) { if (buf.length() > 0) {
value = buf.toString();
}
if (value == null) {
log("No tokens found.", Project.MSG_DEBUG); log("No tokens found.", Project.MSG_DEBUG);
} }
if (buf.length() > 0) { else {
log("Setting property '" + property + "' to " + buf.toString(), Project.MSG_DEBUG); log("Setting property '" + property + "' to " + value, Project.MSG_DEBUG);
getProject().setProperty(property, buf.toString()); 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