mirror of https://gitlab.com/basile.b/dexed.git
fix, the sub project was created twice, leading to a leak + AV when terminating CE
This commit is contained in:
parent
04d7308bf7
commit
94f34b3f88
|
|
@ -160,6 +160,12 @@ begin
|
||||||
{$ELSE}
|
{$ELSE}
|
||||||
pth := GetEnvironmentVariable('HOME') + '/.dub/packages/' + nme + '-master';
|
pth := GetEnvironmentVariable('HOME') + '/.dub/packages/' + nme + '-master';
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
itf := getMessageDisplay;
|
||||||
|
if DirectoryExists(pth) then
|
||||||
|
begin
|
||||||
|
itf.message('the dub package is already fetched', nil, amcApp, amkInf);
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
|
||||||
// fetch
|
// fetch
|
||||||
dub := TProcess.Create(nil);
|
dub := TProcess.Create(nil);
|
||||||
|
|
@ -177,7 +183,6 @@ begin
|
||||||
str := TStringList.Create;
|
str := TStringList.Create;
|
||||||
try
|
try
|
||||||
processOutputToStrings(dub, str);
|
processOutputToStrings(dub, str);
|
||||||
itf := getMessageDisplay;
|
|
||||||
for msg in str do
|
for msg in str do
|
||||||
itf.message(msg, nil, amcMisc, amkAuto);
|
itf.message(msg, nil, amcMisc, amkAuto);
|
||||||
finally
|
finally
|
||||||
|
|
@ -206,7 +211,6 @@ begin
|
||||||
str := TStringList.Create;
|
str := TStringList.Create;
|
||||||
try
|
try
|
||||||
processOutputToStrings(dub, str);
|
processOutputToStrings(dub, str);
|
||||||
itf := getMessageDisplay;
|
|
||||||
for msg in str do
|
for msg in str do
|
||||||
itf.message(msg, nil, amcMisc, amkAuto);
|
itf.message(msg, nil, amcMisc, amkAuto);
|
||||||
finally
|
finally
|
||||||
|
|
@ -221,13 +225,10 @@ begin
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
// TODO-cbugfix: entity connector, AV when CE terminates due to the begin/end update trick.
|
|
||||||
// project used to get the infos
|
// project used to get the infos
|
||||||
EntitiesConnector.beginUpdate;
|
EntitiesConnector.beginUpdate;
|
||||||
prj := TCEDubProject.create(nil);
|
prj := TCEDubProject.create(nil);
|
||||||
EntitiesConnector.removeSubject(prj);
|
|
||||||
try
|
try
|
||||||
prj := TCEDubProject.create(nil);
|
|
||||||
if FileExists(pth + DirectorySeparator + 'dub.json') then
|
if FileExists(pth + DirectorySeparator + 'dub.json') then
|
||||||
prj.loadFromFile(pth + DirectorySeparator + 'dub.json')
|
prj.loadFromFile(pth + DirectorySeparator + 'dub.json')
|
||||||
else if FileExists(pth + DirectorySeparator + 'package.json') then
|
else if FileExists(pth + DirectorySeparator + 'package.json') then
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue