mirror of https://gitlab.com/basile.b/dexed.git
fix, DUB, rel importPaths problem
This commit is contained in:
parent
8d6b6f8b99
commit
7915a315ee
|
@ -734,14 +734,21 @@ procedure TCEDubProject.updateImportPathsFromJson;
|
||||||
var
|
var
|
||||||
arr: TJSONArray;
|
arr: TJSONArray;
|
||||||
item: TJSONData;
|
item: TJSONData;
|
||||||
|
pth: string;
|
||||||
i: integer;
|
i: integer;
|
||||||
begin
|
begin
|
||||||
item := obj.Find('importPaths');
|
item := obj.Find('importPaths');
|
||||||
if assigned(item) then
|
if assigned(item) then
|
||||||
begin
|
begin
|
||||||
arr := TJSONArray(item);
|
arr := TJSONArray(item);
|
||||||
for i:= 0 to arr.Count-1 do
|
for i := 0 to arr.Count-1 do
|
||||||
fImportPaths.Add(arr.Strings[i]);
|
begin
|
||||||
|
pth := TrimRightSet(arr.Strings[i], ['/','\']);
|
||||||
|
if pth.dirExists and FilenameIsAbsolute(pth) then
|
||||||
|
fImportPaths.Add(pth)
|
||||||
|
else
|
||||||
|
fImportPaths.Add(expandFilenameEx(fBasePath, pth));
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
// note: dependencies are added as import to allow DCD completion
|
// note: dependencies are added as import to allow DCD completion
|
||||||
|
|
Loading…
Reference in New Issue