mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-06-04 05:38:28 +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;
|
||||
Begin
|
||||
Result:=Str;
|
||||
SetCodePage(Result,DefaultFileSystemCodePage,True);
|
||||
if StringCodePage(Result)<>DefaultFileSystemCodePage then
|
||||
SetCodePage(Result,DefaultFileSystemCodePage,True);
|
||||
End;
|
||||
|
Loading…
Reference in New Issue
Block a user