зеркало из https://github.com/mozilla/gecko-dev.git
[not part of build] Fix for bug 127085. Unescape file paths before trying to use them. r=sdagley, sr=beard.
This commit is contained in:
Родитель
e0b5d4da68
Коммит
ddb95818d5
|
@ -1317,8 +1317,12 @@ Boolean MRJContext::loadApplet()
|
|||
}
|
||||
cfref<CFStringRef> pathRef = CFStringCreateWithCString(NULL, path, kCFStringEncodingUTF8);
|
||||
delete[] path;
|
||||
if (pathRef)
|
||||
documentBase = CFURLCreateWithFileSystemPath(NULL, pathRef, kCFURLHFSPathStyle, false);
|
||||
if (pathRef) {
|
||||
// unescape the path in case there are spaces in it
|
||||
cfref<CFStringRef> unescPathRef = CFURLCreateStringByReplacingPercentEscapes(NULL, pathRef, CFSTR(""));
|
||||
if (unescPathRef)
|
||||
documentBase = CFURLCreateWithFileSystemPath(NULL, unescPathRef, kCFURLHFSPathStyle, false);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
documentBase = CFURLCreateWithBytes(NULL, (const UInt8*)mDocumentBase,
|
||||
|
|
Загрузка…
Ссылка в новой задаче