bug 411505 - fix more software update charset fallout. r=bsmedberg
git-svn-id: svn://10.0.0.236/trunk@243699 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
85af44201a
commit
ced891c5d8
@ -119,6 +119,13 @@ GetCurrentWorkingDir(char *buf, size_t size)
|
||||
#if defined(XP_OS2)
|
||||
if (DosQueryPathInfo( ".", FIL_QUERYFULLNAME, buf, size))
|
||||
return NS_ERROR_FAILURE;
|
||||
#elif defined(XP_WIN)
|
||||
wchar_t *wpath = _wgetcwd(NULL, size);
|
||||
if (!wpath)
|
||||
return NS_ERROR_FAILURE;
|
||||
NS_ConvertUTF16toUTF8 path(wpath);
|
||||
strncpy(buf, path.get(), size);
|
||||
free(wpath);
|
||||
#else
|
||||
if(!getcwd(buf, size))
|
||||
return NS_ERROR_FAILURE;
|
||||
@ -408,8 +415,16 @@ ApplyUpdate(nsIFile *greDir, nsIFile *updateDir, nsILocalFile *statusFile,
|
||||
if (NS_FAILED(rv))
|
||||
return;
|
||||
|
||||
#if defined(XP_WIN)
|
||||
nsAutoString updateDirPathW;
|
||||
rv = updateDir->GetPath(updateDirPathW);
|
||||
|
||||
NS_ConvertUTF16toUTF8 updateDirPath(updateDirPathW);
|
||||
#else
|
||||
nsCAutoString updateDirPath;
|
||||
rv = updateDir->GetNativePath(updateDirPath);
|
||||
#endif
|
||||
|
||||
if (NS_FAILED(rv))
|
||||
return;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user