This commit is contained in:
Hackerpilot 2015-01-01 18:58:10 -08:00
parent 8f7f94628c
commit a9a7038c40
1 changed files with 6 additions and 3 deletions

View File

@ -103,7 +103,7 @@ struct ModuleCache
*/
static void addImportPaths(string[] paths)
{
foreach (path; paths.filter!(a => existanceCheck(a)))
foreach (path; paths.filter!(a => existanceCheck(a) && !importPaths[].canFind(a)))
importPaths.insert(path);
foreach (path; importPaths[])
@ -118,7 +118,10 @@ struct ModuleCache
}
/// TODO: Implement
static void clear() {}
static void clear()
{
Log.warn("ModuleCache.clear is not yet implemented.");
}
/**
* Params:
@ -222,7 +225,7 @@ struct ModuleCache
if (isRooted(moduleName))
return moduleName;
string[] alternatives;
foreach (path; importPaths)
foreach (path; importPaths[])
{
string dotDi = buildPath(path, moduleName) ~ ".di";
string dotD = dotDi[0 .. $ - 1];