mirror of
https://github.com/reactos/reactos.git
synced 2024-08-21 02:43:48 +00:00
make _tfullpath pass all msvcrt_winetest dir tests
svn path=/trunk/; revision=22202
This commit is contained in:
parent
9f044aa4d8
commit
5c8fb36ad3
|
@ -17,8 +17,16 @@
|
|||
_TCHAR* _tfullpath(_TCHAR* absPath, const _TCHAR* relPath, size_t maxLength)
|
||||
{
|
||||
_TCHAR* lpFilePart;
|
||||
DWORD copied;
|
||||
|
||||
if (GetFullPathName(relPath,maxLength,absPath,&lpFilePart) == 0)
|
||||
if (!absPath)
|
||||
{
|
||||
maxLength = MAX_PATH;
|
||||
absPath = malloc(maxLength);
|
||||
}
|
||||
|
||||
copied = GetFullPathName(relPath,maxLength,absPath,&lpFilePart);
|
||||
if (copied == 0 || copied > maxLength)
|
||||
return NULL;
|
||||
|
||||
return absPath;
|
||||
|
|
Loading…
Reference in a new issue