mirror of
https://github.com/reactos/reactos.git
synced 2025-07-31 22:02:14 +00:00
[KERNEL32]: Reimplement GetDiskFreeSpaceExA() to make it w2k3 compliant
This commit is contained in:
parent
1e2424ee98
commit
8b6518139d
1 changed files with 13 additions and 8 deletions
|
@ -359,18 +359,23 @@ GetDiskFreeSpaceExA(IN LPCSTR lpDirectoryName OPTIONAL,
|
|||
OUT PULARGE_INTEGER lpTotalNumberOfBytes,
|
||||
OUT PULARGE_INTEGER lpTotalNumberOfFreeBytes)
|
||||
{
|
||||
PWCHAR DirectoryNameW=NULL;
|
||||
PCSTR RootPath;
|
||||
PUNICODE_STRING RootPathU;
|
||||
|
||||
if (lpDirectoryName)
|
||||
RootPath = lpDirectoryName;
|
||||
if (RootPath == NULL)
|
||||
{
|
||||
if (!(DirectoryNameW = FilenameA2W(lpDirectoryName, FALSE)))
|
||||
return FALSE;
|
||||
RootPath = "\\";
|
||||
}
|
||||
|
||||
return GetDiskFreeSpaceExW (DirectoryNameW ,
|
||||
lpFreeBytesAvailableToCaller,
|
||||
lpTotalNumberOfBytes,
|
||||
lpTotalNumberOfFreeBytes);
|
||||
RootPathU = Basep8BitStringToStaticUnicodeString(RootPath);
|
||||
if (RootPathU == NULL)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return GetDiskFreeSpaceExW(RootPathU->Buffer, lpFreeBytesAvailableToCaller,
|
||||
lpTotalNumberOfBytes, lpTotalNumberOfFreeBytes);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue