This is an automated email from the git hooks/post-receive script.
www-data pushed a commit to branch master
in repository reactos.
View the commit online:
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=8b6518139db31655a395a…
commit 8b6518139db31655a395a1547dd475f06f79b934
Author: Pierre Schweitzer <pierre(a)reactos.org>
AuthorDate: Wed Oct 4 23:02:22 2017 +0200
[KERNEL32]: Reimplement GetDiskFreeSpaceExA() to make it w2k3 compliant
---
dll/win32/kernel32/client/file/disk.c | 21 +++++++++++++--------
1 file changed, 13 insertions(+), 8 deletions(-)
diff --git a/dll/win32/kernel32/client/file/disk.c
b/dll/win32/kernel32/client/file/disk.c
index 1ba1b73549..1b7d1e3a9d 100644
--- a/dll/win32/kernel32/client/file/disk.c
+++ b/dll/win32/kernel32/client/file/disk.c
@@ -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 = "\\";
+ }
+
+ RootPathU = Basep8BitStringToStaticUnicodeString(RootPath);
+ if (RootPathU == NULL)
+ {
+ return FALSE;
}
- return GetDiskFreeSpaceExW (DirectoryNameW ,
- lpFreeBytesAvailableToCaller,
- lpTotalNumberOfBytes,
- lpTotalNumberOfFreeBytes);
+ return GetDiskFreeSpaceExW(RootPathU->Buffer, lpFreeBytesAvailableToCaller,
+ lpTotalNumberOfBytes, lpTotalNumberOfFreeBytes);
}
/*
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.