mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
[KERNEL32]: Reimplement GetDiskFreeSpaceA() to make it w2k3 compliant
This commit is contained in:
parent
5bee374c82
commit
87448f3d8b
1 changed files with 14 additions and 9 deletions
|
@ -189,19 +189,24 @@ GetDiskFreeSpaceA(IN LPCSTR lpRootPathName,
|
|||
OUT LPDWORD lpNumberOfFreeClusters,
|
||||
OUT LPDWORD lpTotalNumberOfClusters)
|
||||
{
|
||||
PWCHAR RootPathNameW=NULL;
|
||||
PCSTR RootPath;
|
||||
PUNICODE_STRING RootPathU;
|
||||
|
||||
if (lpRootPathName)
|
||||
RootPath = lpRootPathName;
|
||||
if (RootPath == NULL)
|
||||
{
|
||||
if (!(RootPathNameW = FilenameA2W(lpRootPathName, FALSE)))
|
||||
return FALSE;
|
||||
RootPath = "\\";
|
||||
}
|
||||
|
||||
return GetDiskFreeSpaceW (RootPathNameW,
|
||||
lpSectorsPerCluster,
|
||||
lpBytesPerSector,
|
||||
lpNumberOfFreeClusters,
|
||||
lpTotalNumberOfClusters);
|
||||
RootPathU = Basep8BitStringToStaticUnicodeString(RootPath);
|
||||
if (RootPathU == NULL)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return GetDiskFreeSpaceW(RootPathU->Buffer, lpSectorsPerCluster,
|
||||
lpBytesPerSector, lpNumberOfFreeClusters,
|
||||
lpTotalNumberOfClusters);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in a new issue