[ros-diffs] [turner] 18890: Handle possible error from FindFirstFile. Thanks to Thomas for finding the problem.

turner at svn.reactos.com turner at svn.reactos.com
Sun Oct 30 19:02:08 CET 2005


Handle possible error from FindFirstFile. Thanks to Thomas for finding
the problem.
Modified: trunk/reactos/subsys/system/cmd/misc.c
  _____  

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("\\"));
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.reactos.org/pipermail/ros-diffs/attachments/20051030/4682cc70/attachment.html


More information about the Ros-diffs mailing list