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=d7ee95b28ba5232027378e...
commit d7ee95b28ba5232027378e8918317118b1eac9f4 Author: Pierre Schweitzer pierre@reactos.org AuthorDate: Thu Oct 5 23:43:10 2017 +0200
[KERNEL32]: w2k3ify GetDriveTypeA() --- dll/win32/kernel32/client/file/disk.c | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-)
diff --git a/dll/win32/kernel32/client/file/disk.c b/dll/win32/kernel32/client/file/disk.c index e7843067fc..041f4b197b 100644 --- a/dll/win32/kernel32/client/file/disk.c +++ b/dll/win32/kernel32/client/file/disk.c @@ -463,15 +463,26 @@ UINT WINAPI GetDriveTypeA(IN LPCSTR lpRootPathName) { - PWCHAR RootPathNameW; + PWSTR RootPathU;
- if (!lpRootPathName) - return GetDriveTypeW(NULL); + if (lpRootPathName != NULL) + { + PUNICODE_STRING RootPathUStr;
- if (!(RootPathNameW = FilenameA2W(lpRootPathName, FALSE))) - return DRIVE_UNKNOWN; + RootPathUStr = Basep8BitStringToStaticUnicodeString(lpRootPathName); + if (RootPathUStr == NULL) + { + return DRIVE_NO_ROOT_DIR; + } + + RootPathU = RootPathUStr->Buffer; + } + else + { + RootPathU = NULL; + }
- return GetDriveTypeW(RootPathNameW); + return GetDriveTypeW(RootPathU); }
/*