mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-13 20:14:14 +02:00
* fix encoding on save, patch from Ondrej, mantis #33121
git-svn-id: trunk@38105 -
This commit is contained in:
parent
7f15b109ad
commit
79ebe68e8b
@ -1340,15 +1340,12 @@ begin
|
|||||||
If D <> '' Then
|
If D <> '' Then
|
||||||
if not ForceDirectories(D) then
|
if not ForceDirectories(D) then
|
||||||
Raise EInoutError.CreateFmt(SErrCouldNotCreatePath,[D]);
|
Raise EInoutError.CreateFmt(SErrCouldNotCreatePath,[D]);
|
||||||
if FEncoding=nil then
|
slLines.SaveToFile(FFileName, FEncoding);
|
||||||
slLines.SaveToFile(FFileName)
|
|
||||||
else
|
|
||||||
slLines.SaveToFile(FFileName, FEncoding);
|
|
||||||
end
|
end
|
||||||
else if FStream <> nil then
|
else if FStream <> nil then
|
||||||
begin
|
begin
|
||||||
Fstream.Size:=0;
|
Fstream.Size:=0;
|
||||||
slLines.SaveToStream(FStream);
|
slLines.SaveToStream(FStream, FEncoding);
|
||||||
end;
|
end;
|
||||||
FillSectionList(slLines);
|
FillSectionList(slLines);
|
||||||
FDirty := false;
|
FDirty := false;
|
||||||
|
Loading…
Reference in New Issue
Block a user