diff --git a/PlatformUtils.pas b/PlatformUtils.pas index 26577d9..dcfebee 100644 --- a/PlatformUtils.pas +++ b/PlatformUtils.pas @@ -68,7 +68,16 @@ end; function GetAppCfgDir: string; begin +{$IFDEF WINDOWS} + Result := GetEnvironmentVariable('APPDATA'); + if Result = '' then + Result := GetEnvironmentVariable('LOCALAPPDATA'); + if Result = '' then + Result := ExtractFilePath(ParamStr(0)); + Result := IncludeTrailingPathDelimiter(Result) + 'ewsdr' + PathDelim; +{$ELSE} Result := IncludeTrailingPathDelimiter(GetAppConfigDir(False)); +{$ENDIF} if not DirectoryExists(Result) then ForceDirectories(Result); end;