mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-09 11:08:00 +02:00
IDE: Make sure temp dir exists before starting IPC server. Issue #35838.
git-svn-id: trunk@62494 -
This commit is contained in:
parent
63cc527b35
commit
653dca44e0
@ -627,6 +627,7 @@ end;
|
||||
procedure TUniqueServer.StartUnique(const aServerPrefix: string);
|
||||
var
|
||||
I: Integer;
|
||||
Tmp: String;
|
||||
begin
|
||||
if Active then
|
||||
StopServer;
|
||||
@ -635,11 +636,12 @@ begin
|
||||
while not Active do
|
||||
begin
|
||||
Inc(I);
|
||||
if I < 10 then
|
||||
ServerID := aServerPrefix+'0'+IntToStr(I)
|
||||
else
|
||||
ServerID := aServerPrefix+IntToStr(I);
|
||||
StartServer;
|
||||
ServerID := aServerPrefix+Format('%.2d',[I]);
|
||||
// FileName is composed of TempDir and ServerID. Make sure TempDir exists.
|
||||
Tmp := GetTempDir(Global); // Use TIPCBase.Global property also here.
|
||||
if not DirectoryExists(Tmp) then
|
||||
ForceDirectories(Tmp);
|
||||
StartServer; // This uses the FileName in TempDir.
|
||||
end;
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user