mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-12 04:45:45 +00:00
#141877 file:// protocol does not display non ASCII folder name under cjk window system
use mbsrchr to check if the last char in patch is '\' r=dougt, sr=alecf
This commit is contained in:
parent
847b3ad569
commit
d2a268fe04
@ -725,7 +725,8 @@ nsLocalFile::InitWithNativePath(const nsACString &filePath)
|
|||||||
|
|
||||||
// kill any trailing '\' provided it isn't the second char of DBCS
|
// kill any trailing '\' provided it isn't the second char of DBCS
|
||||||
PRInt32 len = pathLen - 1;
|
PRInt32 len = pathLen - 1;
|
||||||
if (path[len] == '\\' && !::IsDBCSLeadByte(path[len-1]))
|
if (path[len] == '\\' && (!::IsDBCSLeadByte(path[len-1]) ||
|
||||||
|
_mbsrchr((const unsigned char *)path, '\\') == (const unsigned char *)path+len))
|
||||||
{
|
{
|
||||||
path[len] = '\0';
|
path[len] = '\0';
|
||||||
pathLen = len;
|
pathLen = len;
|
||||||
|
Loading…
Reference in New Issue
Block a user