diff --git a/source/dub/project.d b/source/dub/project.d index 1968eed..3af0295 100644 --- a/source/dub/project.d +++ b/source/dub/project.d @@ -1205,17 +1205,19 @@ static if (glob) assert(is_path, "can't glob something that isn't a path"); var = var.expandVars!(varName => getVariable(varName, project, pack, gsettings)); - if (!is_path) - return var; - auto p = NativePath(var); - string res; + if (!is_path) { + static if (glob) return [var]; + else return var; + } + auto p = NativePath(var); + string res; if (!p.absolute) res = (pack.path ~ p).toNativeString(); else res = p.toNativeString(); - static if (!glob) + static if (!glob) return res; - else { + else { // Find the unglobbed prefix and iterate from there. size_t i = 0; size_t sepIdx = 0;