mirror of
https://github.com/reactos/reactos.git
synced 2025-08-02 05:15:41 +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 lpTotalNumberOfBytes,
|
||||||
OUT PULARGE_INTEGER lpTotalNumberOfFreeBytes)
|
OUT PULARGE_INTEGER lpTotalNumberOfFreeBytes)
|
||||||
{
|
{
|
||||||
PWCHAR DirectoryNameW=NULL;
|
PCSTR RootPath;
|
||||||
|
PUNICODE_STRING RootPathU;
|
||||||
|
|
||||||
if (lpDirectoryName)
|
RootPath = lpDirectoryName;
|
||||||
|
if (RootPath == NULL)
|
||||||
{
|
{
|
||||||
if (!(DirectoryNameW = FilenameA2W(lpDirectoryName, FALSE)))
|
RootPath = "\\";
|
||||||
return FALSE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return GetDiskFreeSpaceExW (DirectoryNameW ,
|
RootPathU = Basep8BitStringToStaticUnicodeString(RootPath);
|
||||||
lpFreeBytesAvailableToCaller,
|
if (RootPathU == NULL)
|
||||||
lpTotalNumberOfBytes,
|
{
|
||||||
lpTotalNumberOfFreeBytes);
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
return GetDiskFreeSpaceExW(RootPathU->Buffer, lpFreeBytesAvailableToCaller,
|
||||||
|
lpTotalNumberOfBytes, lpTotalNumberOfFreeBytes);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue