mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-06-27 12:28:22 +02:00
* small optimisation for ToSingleByteFileSystemEncodedFileName(rawbytestring):
don't call SetCodePage() if the input already has the correct code page (SetCodePage would always make the string unique, which is not necessary) git-svn-id: branches/cpstrrtl@24962 -
This commit is contained in:
parent
980975ff85
commit
e65d01a717
@ -2296,5 +2296,6 @@ End;
|
|||||||
Function ToSingleByteFileSystemEncodedFileName(const Str: RawByteString): RawByteString;
|
Function ToSingleByteFileSystemEncodedFileName(const Str: RawByteString): RawByteString;
|
||||||
Begin
|
Begin
|
||||||
Result:=Str;
|
Result:=Str;
|
||||||
|
if StringCodePage(Result)<>DefaultFileSystemCodePage then
|
||||||
SetCodePage(Result,DefaultFileSystemCodePage,True);
|
SetCodePage(Result,DefaultFileSystemCodePage,True);
|
||||||
End;
|
End;
|
||||||
|
Loading…
Reference in New Issue
Block a user