Commit aaa91aa321dbed7cb627e4b545ab98f719d134f9
1 parent
5cf07e3b
Exists in
master
fix IP loading procedure
Showing
1 changed file
with
6 additions
and
3 deletions
Show diff stats
units/zmq_network.pas
... | ... | @@ -323,13 +323,16 @@ begin |
323 | 323 | end; |
324 | 324 | |
325 | 325 | procedure LoadIP; //forward; |
326 | -var S : TStringList; | |
326 | +var | |
327 | + S : TStringList; | |
328 | + IPPath: String; | |
327 | 329 | begin |
328 | - if FileExists(GetCurrentDir+'IP') then | |
330 | + IPPath := ExtractFilePath(Application.ExeName)+'IP'; | |
331 | + if FileExists(IPPath) then | |
329 | 332 | begin |
330 | 333 | S := TStringList.Create; |
331 | 334 | try |
332 | - S.LoadFromFile(ExtractFilePath(Application.ExeName)+'IP'); | |
335 | + S.LoadFromFile(IPPath); | |
333 | 336 | GClientHost := 'tcp://'+S[0]+':'; |
334 | 337 | finally |
335 | 338 | S.Free; | ... | ... |