Merge pull request #271 from CZDanol/master

Fix -c flag not looking into the *bottom level folder
This commit is contained in:
Brian Schott 2017-05-12 14:49:49 -07:00 committed by GitHub
commit a93efb66fb
1 changed files with 2 additions and 2 deletions

View File

@ -132,9 +132,9 @@ EC getConfigFor(EC)(string path)
EC[][] configs; EC[][] configs;
immutable expanded = absolutePath(path); immutable expanded = absolutePath(path);
immutable bool id = isDir(expanded); immutable bool id = isDir(expanded);
immutable string dir = dirName(expanded);
immutable string fileName = id ? "dummy.d" : baseName(expanded); immutable string fileName = id ? "dummy.d" : baseName(expanded);
string[] pathParts = cast(string[]) pathSplitter(dir).array(); string[] pathParts = cast(string[]) pathSplitter(expanded).array();
for (size_t i = pathParts.length; i > 1; i--) for (size_t i = pathParts.length; i > 1; i--)
{ {
EC[] sections = parseConfig!EC(buildPath(pathParts[0 .. i])); EC[] sections = parseConfig!EC(buildPath(pathParts[0 .. i]));