diff --git a/src/dscanner/utils.d b/src/dscanner/utils.d index 92d25e5..d5b1d29 100644 --- a/src/dscanner/utils.d +++ b/src/dscanner/utils.d @@ -84,7 +84,7 @@ string[] expandArgs(string[] args) { import std.file : isFile, FileException, dirEntries, SpanMode; import std.algorithm.iteration : map; - import std.algorithm.searching : endsWith; + import std.algorithm.searching : endsWith, find; // isFile can throw if it's a broken symlink. bool isFileSafe(T)(T a) @@ -105,7 +105,7 @@ string[] expandArgs(string[] args) else foreach (item; dirEntries(arg, SpanMode.breadth).map!(a => a.name)) { - if (isFileSafe(item) && (item.endsWith(`.d`) || item.endsWith(`.di`))) + if (isFileSafe(item) && (item.endsWith(`.d`) || item.endsWith(`.di`)) && !item.find('.git')) rVal ~= item; else continue;