use buildPath instead of string concat

This commit is contained in:
Hackerpilot 2012-06-17 18:43:00 +00:00
parent b07e9f94ef
commit 8775d2e968
2 changed files with 2 additions and 4 deletions

View File

@ -326,10 +326,10 @@ struct AutoComplete
foreach (path; context.importDirectories) foreach (path; context.importDirectories)
{ {
stderr.writeln("Searching for ", path, "/", part); stderr.writeln("Searching for ", path, "/", part);
if (!exists(path ~ "/" ~ part)) if (!exists(buildPath(path, part))
continue; continue;
stderr.writeln("found it"); stderr.writeln("found it");
foreach (DirEntry dirEntry; dirEntries(path ~ "/" ~ part, foreach (DirEntry dirEntry; dirEntries(buildPath(path, part),
SpanMode.shallow)) SpanMode.shallow))
{ {
if (dirEntry.isDir) if (dirEntry.isDir)

2
main.d
View File

@ -219,7 +219,5 @@ void main(string[] args)
m.writeCtagsTo(stdout, ""); m.writeCtagsTo(stdout, "");
} }
} }
} }
} }