Merge pull request #16 from Dav1dde/aip

don't add import paths twice
This commit is contained in:
Hackerpilot 2013-08-18 16:59:34 -07:00
commit bb0fe7ccce
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))