Handle possible error from FindFirstFile. Thanks to Thomas for finding the problem.
Modified: trunk/reactos/subsys/system/cmd/misc.c
--- trunk/reactos/subsys/system/cmd/misc.c 2005-10-30 17:50:03 UTC (rev 18889) +++ trunk/reactos/subsys/system/cmd/misc.c 2005-10-30 18:01:50 UTC (rev 18890) @@ -101,6 +101,11 @@
else
{
hFind = FindFirstFile(TempPath,&FindFileData);
+ if(hFind == INVALID_HANDLE_VALUE)
+ {
+ _tcscpy(OutPath, Path);
+ return;
+ }
_tcscat(TempPath, _T("\\"));
_tcscat(OutPath, FindFileData.cFileName);
_tcscat(OutPath, _T("\\"));