From aaa91aa321dbed7cb627e4b545ab98f719d134f9 Mon Sep 17 00:00:00 2001 From: Rafael Picanço Date: Sat, 17 Dec 2016 14:51:18 -0300 Subject: [PATCH] fix IP loading procedure --- units/zmq_network.pas | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/units/zmq_network.pas b/units/zmq_network.pas index 4efd163..e0c84ae 100644 --- a/units/zmq_network.pas +++ b/units/zmq_network.pas @@ -323,13 +323,16 @@ begin end; procedure LoadIP; //forward; -var S : TStringList; +var + S : TStringList; + IPPath: String; begin - if FileExists(GetCurrentDir+'IP') then + IPPath := ExtractFilePath(Application.ExeName)+'IP'; + if FileExists(IPPath) then begin S := TStringList.Create; try - S.LoadFromFile(ExtractFilePath(Application.ExeName)+'IP'); + S.LoadFromFile(IPPath); GClientHost := 'tcp://'+S[0]+':'; finally S.Free; -- libgit2 0.21.2