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=87448f3d8b26a6696f143…
commit 87448f3d8b26a6696f143872874200ef5799565d
Author: Pierre Schweitzer <pierre(a)reactos.org>
AuthorDate: Wed Oct 4 22:30:18 2017 +0200
[KERNEL32]: Reimplement GetDiskFreeSpaceA() to make it w2k3 compliant
---
dll/win32/kernel32/client/file/disk.c | 23 ++++++++++++++---------
1 file changed, 14 insertions(+), 9 deletions(-)
diff --git a/dll/win32/kernel32/client/file/disk.c
b/dll/win32/kernel32/client/file/disk.c
index 7ff6e88f1a..5854b2320e 100644
--- a/dll/win32/kernel32/client/file/disk.c
+++ b/dll/win32/kernel32/client/file/disk.c
@@ -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 = "\\";
+ }
+
+ RootPathU = Basep8BitStringToStaticUnicodeString(RootPath);
+ if (RootPathU == NULL)
+ {
+ return FALSE;
}
- return GetDiskFreeSpaceW (RootPathNameW,
- lpSectorsPerCluster,
- lpBytesPerSector,
- lpNumberOfFreeClusters,
- lpTotalNumberOfClusters);
+ return GetDiskFreeSpaceW(RootPathU->Buffer, lpSectorsPerCluster,
+ lpBytesPerSector, lpNumberOfFreeClusters,
+ lpTotalNumberOfClusters);
}
/*
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.