Author: fireball
Date: Fri Jan 28 20:22:15 2011
New Revision: 50544

URL: http://svn.reactos.org/svn/reactos?rev=50544&view=rev
Log:
- Robert Horvath: Modify GetFullPathName to follow Windows behaviour more 
closely. Reduces kernel32:path winetests by 4, and fixes all GetFullPathName 
tests.
See issue #5865 for more details.

Modified:
    trunk/reactos/dll/win32/kernel32/file/dir.c

Modified: trunk/reactos/dll/win32/kernel32/file/dir.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/file/dir.c?rev=50544&r1=50543&r2=50544&view=diff
==============================================================================
--- trunk/reactos/dll/win32/kernel32/file/dir.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/file/dir.c [iso-8859-1] Fri Jan 28 
20:22:15 2011
@@ -599,12 +599,6 @@
    TRACE("GetFullPathNameA(lpFileName %s, nBufferLength %d, lpBuffer %p, "
         "lpFilePart %p)\n",lpFileName,nBufferLength,lpBuffer,lpFilePart);
 
-   if (!lpFileName)
-   {
-     SetLastError(ERROR_INVALID_PARAMETER);
-     return 0;
-   }
-
    if (!(FileNameW = FilenameA2W(lpFileName, FALSE)))
       return 0;
 
@@ -661,6 +655,14 @@
 
     TRACE("GetFullPathNameW ret: lpBuffer %S lpFilePart %S Length %ld\n",
            lpBuffer, (lpFilePart == NULL) ? L"NULL" : *lpFilePart, Length / 
sizeof(WCHAR));
+
+    if (!lpFileName)
+    {
+#if (WINVER >= _WIN32_WINNT_WIN7)
+        SetLastError(ERROR_INVALID_PARAMETER);
+#endif
+        return 0;
+    }
 
     return Length/sizeof(WCHAR);
 }


Reply via email to