FIX: Incorrect display of configuration directory

This commit is contained in:
Alexander Koblov 2009-03-14 19:18:54 +00:00
commit 0219763670
2 changed files with 2 additions and 3 deletions

View file

@ -375,7 +375,7 @@ begin
end;
// Show configuration directory
rbProgramDir.Caption:= rbProgramDir.Caption + ' - [' + gpCfgDir + ']';
rbUserHomeDir.Caption:= rbUserHomeDir.Caption + ' - [' + gpIniDir + ']';
rbUserHomeDir.Caption:= rbUserHomeDir.Caption + ' - [' + GetAppConfigDir + PathDelim + ']';
// tvTreeView localization
with tvTreeView.Items do
begin

View file

@ -24,6 +24,7 @@ procedure LoadPaths;
var
Ini : TIniFileEx;
begin
OnGetApplicationName := @GetAppName;
gpExePath := ExtractFilePath(SysToUTF8(ParamStr(0)));
DebugLn('Executable directory: ', gpExePath);
@ -36,11 +37,9 @@ begin
end
else
begin
OnGetApplicationName := @GetAppName;
gpIniDir := GetAppConfigDir;//(False);
if not mbDirectoryExists(gpIniDir) then
ForceDirectory(gpIniDir);
OnGetApplicationName := nil;
gpIniDir := IncludeTrailingPathDelimiter(gpIniDir); // add if need path delimiter
end;
Ini.Free;