TIniFile.ReadSectionRaw does not return comments
Original Reporter info from Mantis: Schlaefer
-
Reporter name: Martin Jülich
Original Reporter info from Mantis: Schlaefer
- Reporter name: Martin Jülich
Description:
From documentation: "ReadSectionRaw returns the contents of the section Section as it is: this includes the comments in the section."
procedure TIniFile.ReadSectionRaw(const Section: string; Strings: TStrings);
var
oSection: TIniFileSection;
i: integer;
begin
Strings.BeginUpdate;
try
Strings.Clear;
oSection := FSectionList.SectionByName(Section,CaseSensitive);
if oSection <> nil then with oSection.KeyList do
for i := 0 to Count-1 do
if not IsComment(Items[i].Ident) then //<<<<<<<<<<<<<< comments will NOT be included
begin
if Items[i].Ident<>'' then
Strings.Add(Items[i].Ident + Separator +Items[i].Value)
else
Strings.Add(Items[i].Value);
end;
finally
Strings.EndUpdate;
end;
end;
Mantis conversion info:
- Mantis ID: 35731
- Version: 3.0.4
- Fixed in version: 3.3.1
- Fixed in revision: 42247 (#db2c9183)
- Target version: 3.2.0