r=mkaply, sr=blizzard (platform specific), a=mkaply (OS/2 only) Patch from Andy Willis for XUL Runner - convert a Unix path to platform path git-svn-id: svn://10.0.0.236/trunk@172601 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
c5d276a255
commit
5ece53e9fe
@ -795,7 +795,7 @@ XRE_GetFileFromPath(const char *aPath, nsILocalFile* *aResult)
|
||||
CFRelease(fullPath);
|
||||
return rv;
|
||||
|
||||
#elif defined(XP_UNIX) || defined(XP_OS2)
|
||||
#elif defined(XP_UNIX)
|
||||
char fullPath[MAXPATHLEN];
|
||||
|
||||
if (!realpath(aPath, fullPath))
|
||||
@ -803,6 +803,18 @@ XRE_GetFileFromPath(const char *aPath, nsILocalFile* *aResult)
|
||||
|
||||
return NS_NewNativeLocalFile(nsDependentCString(fullPath), PR_TRUE,
|
||||
aResult);
|
||||
#elif defined(XP_OS2)
|
||||
char fullPath[MAXPATHLEN];
|
||||
|
||||
if (!realpath(aPath, fullPath))
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
// realpath on OS/2 returns a unix-ized path, so re-native-ize
|
||||
for (char* ptr = strchr(fullPath, '/'); ptr; ptr = strchr(ptr, '/'))
|
||||
*ptr = '\\';
|
||||
|
||||
return NS_NewNativeLocalFile(nsDependentCString(fullPath), PR_TRUE,
|
||||
aResult);
|
||||
|
||||
#elif defined(XP_WIN)
|
||||
char fullPath[MAXPATHLEN];
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user