mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Get rid of FSRef usage in XRE_GetBinaryPath. Also resolve cached paths when initializing from CFURL sources. b=506812 r=vlad
This commit is contained in:
parent
8c81f341a1
commit
953c7cb963
@ -1453,13 +1453,7 @@ XRE_GetBinaryPath(const char* argv0, nsILocalFile* *aResult)
|
||||
if (!bundleURL)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
FSRef fileRef;
|
||||
if (!CFURLGetFSRef(bundleURL, &fileRef)) {
|
||||
CFRelease(bundleURL);
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
rv = lfm->InitWithFSRef(&fileRef);
|
||||
rv = lfm->InitWithCFURL(bundleURL);
|
||||
CFRelease(bundleURL);
|
||||
|
||||
if (NS_FAILED(rv))
|
||||
|
@ -1936,7 +1936,7 @@ nsresult nsLocalFile::SetBaseURL(CFURLRef aCFURLRef)
|
||||
::CFRelease(mBaseURL);
|
||||
mBaseURL = aCFURLRef;
|
||||
|
||||
if (!::CFURLGetFileSystemRepresentation(mBaseURL, NO, (UInt8*)mPath, PATH_MAX))
|
||||
if (!::CFURLGetFileSystemRepresentation(mBaseURL, true, (UInt8*)mPath, PATH_MAX))
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
return NS_OK;
|
||||
|
Loading…
Reference in New Issue
Block a user