Skip to content

Commit 3e680a3

Browse files
fix: build error in latest Lazarus 3.0
LazUTF8Classes is no longer present in Lazarus 3.0
1 parent 4c99819 commit 3e680a3

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

source/code/decodetorrent.pas

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
interface
1818

1919
uses
20-
Classes, SysUtils, contnrs, LazUTF8Classes, BEncode;
20+
Classes, SysUtils, contnrs, BEncode;
2121

2222
type
2323

@@ -177,13 +177,13 @@ destructor TDecodeTorrent.Destroy;
177177

178178
function TDecodeTorrent.DecodeTorrent(const Filename: utf8string): boolean;
179179
var
180-
S: TFileStreamUtf8;
180+
S: TFileStream;
181181
begin
182182
FFilenameTorrent := Filename;
183183
//Load torrent file in FMemoryStream. This will be process by DecodeTorrent();
184184
try
185185
//Support FilenameTorrent with unicode.
186-
S := TFileStreamUtf8.Create(FilenameTorrent, fmOpenRead or fmShareDenyWrite);
186+
S := TFileStream.Create(FilenameTorrent, fmOpenRead or fmShareDenyWrite);
187187
try
188188
FMemoryStream.LoadFromStream(S);
189189
finally
@@ -571,14 +571,14 @@ procedure TDecodeTorrent.RemoveAnnounceList;
571571
function TDecodeTorrent.SaveTorrent(const Filename: utf8string): boolean;
572572
var
573573
str: utf8string;
574-
S: TFileStreamUTF8;
574+
S: TFileStream;
575575
begin
576576
try
577577
//Encode it to string format
578578
str := '';
579579
TBEncoded.Encode(FBEncoded, str);
580580
//Write string to file. Support filename with unicode.
581-
S := TFileStreamUTF8.Create(FileName, fmCreate);
581+
S := TFileStream.Create(FileName, fmCreate);
582582
try
583583
Result := s.Write(Str[1], length(Str)) = length(Str);
584584
finally

0 commit comments

Comments
 (0)