Bug 422786 - reduce narrow Windows API calls in rdf, original patch by Brad Lassey <blassey@mozilla.com>, r=ted.mielczarek
This commit is contained in:
Родитель
e9d4be76f6
Коммит
b85b3299d3
|
@ -928,14 +928,15 @@ FileSystemDataSource::GetVolumeList(nsISimpleEnumerator** aResult)
|
|||
#if defined (XP_WIN) && !defined (WINCE)
|
||||
|
||||
PRInt32 driveType;
|
||||
char drive[32];
|
||||
PRUnichar drive[32];
|
||||
PRInt32 volNum;
|
||||
char *url;
|
||||
|
||||
for (volNum = 0; volNum < 26; volNum++)
|
||||
{
|
||||
sprintf(drive, "%c:\\", volNum + 'A');
|
||||
driveType = GetDriveType(drive);
|
||||
swprintf( drive, L"%c:\\", volNum + (PRUnichar)'A');
|
||||
|
||||
driveType = GetDriveTypeW(drive);
|
||||
if (driveType != DRIVE_UNKNOWN && driveType != DRIVE_NO_ROOT_DIR)
|
||||
{
|
||||
if (nsnull != (url = PR_smprintf("file:///%c|/", volNum + 'A')))
|
||||
|
|
Загрузка…
Ссылка в новой задаче