Commit 38389bcc authored by Sharaf Zaman's avatar Sharaf Zaman

Fix infinite recursion when the asset is empty

parent 0d9d7850
......@@ -69,7 +69,9 @@ class ConfigsManager {
}
else {
for (String asset : assets) {
recurse(toPath(path, asset));
if (asset.length() > 0) {
recurse(toPath(path, asset));
}
}
}
} catch (IOException ex) {
......@@ -98,7 +100,7 @@ class ConfigsManager {
}
// if last character is '/', then delete it
if (result.charAt(result.length() - 1) == '/') {
if (result.length() != 0 && result.charAt(result.length() - 1) == '/') {
result.deleteCharAt(result.length() - 1);
}
return result.toString();
......
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