- Set the last error if SearchPathW fails.

svn path=/trunk/; revision=4162
This commit is contained in:
Hartmut Birr 2003-02-16 18:56:04 +00:00
parent 77e9bdc898
commit bf6c33299c

View file

@ -1,4 +1,4 @@
/* $Id: dir.c,v 1.33 2003/01/15 21:24:33 chorns Exp $
/* $Id: dir.c,v 1.34 2003/02/16 18:56:04 hbirr Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
@ -598,6 +598,7 @@ SearchPathW (
len * sizeof(WCHAR));
if (EnvironmentBufferW == NULL)
{
SetLastError(ERROR_OUTOFMEMORY);
return 0;
}
@ -620,6 +621,10 @@ SearchPathW (
{
RtlFreeHeap(GetProcessHeap(), 0, EnvironmentBufferW);
}
if (retCode == 0)
{
SetLastError(ERROR_FILE_NOT_FOUND);
}
return retCode;
}