Fix #105
This commit is contained in:
parent
5077cd49d3
commit
29e23122af
2
dscanner
2
dscanner
|
@ -1 +1 @@
|
|||
Subproject commit 552d0bbb074445979675ab9784baf8119c6e1f3e
|
||||
Subproject commit 42762f8dcd2ca542d07e3fd5bc3ae0586fc7ea68
|
|
@ -46,6 +46,14 @@ struct CacheEntry
|
|||
}
|
||||
}
|
||||
|
||||
bool existanceCheck(A)(A path)
|
||||
{
|
||||
if (path.exists())
|
||||
return true;
|
||||
Log.error("Cannot cache modules in ", path, " because it does not exist");
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Caches pre-parsed module information.
|
||||
*/
|
||||
|
@ -66,16 +74,9 @@ struct ModuleCache
|
|||
*/
|
||||
static void addImportPaths(string[] paths)
|
||||
{
|
||||
foreach (path; paths)
|
||||
{
|
||||
if (!exists(path))
|
||||
{
|
||||
Log.error("Cannot cache modules in ", path, " because it does not exist");
|
||||
continue;
|
||||
}
|
||||
importPaths ~= path;
|
||||
}
|
||||
foreach (path; paths)
|
||||
string[] addedPaths = paths.filter!(a => existanceCheck(a)).array();
|
||||
importPaths ~= addedPaths;
|
||||
foreach (path; addedPaths)
|
||||
{
|
||||
foreach (fileName; dirEntries(path, "*.{d,di}", SpanMode.depth))
|
||||
{
|
||||
|
|
2
server.d
2
server.d
|
@ -218,7 +218,7 @@ string[] loadConfiguredImportDirs()
|
|||
return [];
|
||||
Log.info("Loading configuration from ", configLocation);
|
||||
File f = File(configLocation, "rt");
|
||||
return f.byLine(KeepTerminator.no).map!(a => a.idup).filter!(a => a.exists()).array();
|
||||
return f.byLine(KeepTerminator.no).map!(a => a.idup).filter!(a => existanceCheck(a)).array();
|
||||
}
|
||||
|
||||
void printHelp(string programName)
|
||||
|
|
Loading…
Reference in New Issue