diff --git a/ide/environmentopts.pp b/ide/environmentopts.pp index 85df88f6c7..797df6fee8 100644 --- a/ide/environmentopts.pp +++ b/ide/environmentopts.pp @@ -3490,10 +3490,9 @@ begin eopLazarusDirectory: // lazarus directory begin + ParsedValue:=TrimAndExpandDirectory(ParsedValue,GetPrimaryConfigPath); if ParsedValue='' then - ParsedValue:=AppendPathDelim(GetCurrentDirUTF8) - else - ParsedValue:=TrimAndExpandDirectory(ParsedValue,GetCurrentDirUTF8); + ParsedValue:=TrimFilename(AppendPathDelim(GetCurrentDirUTF8)); end; eopFPCSourceDirectory,eopTestBuildDirectory: // directory