diff --git a/CHANGELOG.md b/CHANGELOG.md index ca2d17b6..01a63664 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,13 @@ -# v3.9.22-dev +# v3.9.23-dev ## Enhancements - GDB Commander, center editor view after double click on the call stack. +## Fixes + +- fix, dub projects, "sourcePath" not tried in the "subPackages". + # v3.9.22 ## Enhancements diff --git a/src/u_dubproject.pas b/src/u_dubproject.pas index dab93ad8..3bb0f28d 100644 --- a/src/u_dubproject.pas +++ b/src/u_dubproject.pas @@ -1379,6 +1379,22 @@ begin fSrcs.Add(patchPlateformPath(ExtractRelativepath(fBasePath, abs))); end; end; +procedure tryFromCustomPath(o: TJSONObject); +var + i: integer; + a: TJSONArray; + p: string; +begin + if o.findArray('sourcePaths', a) then + for i := 0 to a.Count-1 do + begin + p := TrimRightSet(a.Strings[i], ['/','\']); + if p.dirExists and FilenameIsAbsolute(p) then + tryAddFromFolder(p) + else + tryAddFromFolder(expandFilenameEx(fBasePath, p)); + end; +end; procedure trySubpPackages(a: TJSONArray); var n: TJSONData; @@ -1396,6 +1412,7 @@ begin o := a.Objects[i]; if o.findAny('name', n) then tryAddFromFolder(fBasePath + n.AsString); + tryFromCustomPath(o); end; end; end; @@ -1449,15 +1466,7 @@ begin fSrcs.Add(patchPlateformPath(pth)); end; // custom folders in current config - if conf.findArray('sourcePaths', arr) then - for i := 0 to arr.Count-1 do - begin - pth := TrimRightSet(arr.Strings[i], ['/','\']); - if pth.dirExists and FilenameIsAbsolute(pth) then - tryAddFromFolder(pth) - else - tryAddFromFolder(expandFilenameEx(fBasePath, pth)); - end; + tryFromCustomPath(conf); // subpackages if conf.findArray('subPackages', arr) then trySubpPackages(arr);