diff --git a/src/u_dubproject.pas b/src/u_dubproject.pas index 8a41f550..cd4c0ebd 100644 --- a/src/u_dubproject.pas +++ b/src/u_dubproject.pas @@ -1374,8 +1374,6 @@ begin begin lst.Clear; listFiles(lst, pth, true); - if lst.Count > 0 then - fImportPaths.Add(pth); for abs in lst do if isDlangCompilable(abs.extractFileExt) then fSrcs.Add(patchPlateformPath(ExtractRelativepath(fBasePath, abs))); @@ -1396,6 +1394,15 @@ begin else tryAddFromFolder(expandFilenameEx(fBasePath, p)); end; + if o.findArray('importPaths', a) then + for i := 0 to a.Count-1 do + begin + p := TrimRightSet(a.Strings[i], ['/','\']); + if p.dirExists and FilenameIsAbsolute(p) then + fImportPaths.Add(p) + else + fImportPaths.Add(expandFilenameEx(fBasePath, p)); + end; end; procedure trySubpPackages(a: TJSONArray); var