make GetRootPath bit faster if it does not get a drive name with :
Modified: trunk/reactos/subsys/system/cmd/internal.c

Modified: trunk/reactos/subsys/system/cmd/internal.c
--- trunk/reactos/subsys/system/cmd/internal.c	2005-07-18 22:44:13 UTC (rev 16636)
+++ trunk/reactos/subsys/system/cmd/internal.c	2005-07-18 23:04:39 UTC (rev 16637)
@@ -148,10 +148,10 @@
 		free (lpLastPath);
 }
 
-/* help functions for getting current path from driver 
-   without changing driver. Return code 0 = ok, 1 = fail.
+/* help functions for getting current path from drive 
+   without changing drive. Return code 0 = ok, 1 = fail.
    INT GetRootPath("C:",outbuffer,chater size of outbuffer);
-   the frist param can have any size, if the the two frist
+   the first param can have any size, if the the two frist
    letter are not a drive with : it will get Currentpath on
    current drive exacly as GetCurrentDirectory does.
    */
@@ -161,17 +161,23 @@
   INT retcode = 1;
   INT t;
 
-  for (t=0;t<32;t++) 
-  {    
-    if (_tgetdcwd(t,OutPath,size) != NULL) 
-    {
-      if (_tcsncicmp(InPath,OutPath,2))
-      {
-       retcode = 0;      
-       return retcode;
-      }
-    }    
-  }
+   if (_tcslen(InPath)>1)
+  {
+    if (InPath[1]==_T(':'))
+    {   
+      for (t=0;t<32;t++) 
+      {    
+        if (_tgetdcwd(t,OutPath,size) != NULL) 
+        {
+          if (_tcsncicmp(InPath,OutPath,2))
+          {
+            retcode = 0;      
+            return retcode;
+          }
+         }    
+        }
+       }
+   }
    
   /* fail to getting path devic did not exists */
   if (_tcslen(InPath)>1)