don't add import paths twice

This commit is contained in:
David 2013-08-18 23:52:07 +02:00
parent 7b73793d58
commit 27fa4aa606
1 changed files with 2 additions and 1 deletions

View File

@ -26,6 +26,7 @@ import stdx.d.ast;
import std.stdio;
import std.array;
import std.path;
import std.algorithm;
import acvisitor;
import actypes;
@ -57,7 +58,7 @@ struct ModuleCache
*/
static void addImportPath(string path)
{
if (!exists(path))
if (!exists(path) || importPaths.canFind(path))
return;
importPaths ~= path;
foreach (fileName; dirEntries(path, "*.{d,di}", SpanMode.depth))