* 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:
Jonas Maebe 2013-06-24 09:40:06 +00:00
parent 980975ff85
commit e65d01a717

View File

@ -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;