From e4549de4a38cd63b8966689ba60ea1614e225670 Mon Sep 17 00:00:00 2001 From: Alex Ionescu Date: Thu, 21 Jul 2005 03:26:42 +0000 Subject: [PATCH] - Fix "cd" usage when the initial directory is a directory right on top of the root drive. (Brandon Turner) svn path=/trunk/; revision=16674 --- reactos/subsys/system/cmd/internal.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/reactos/subsys/system/cmd/internal.c b/reactos/subsys/system/cmd/internal.c index 8ec6bbc39e7..9cddb90b39a 100644 --- a/reactos/subsys/system/cmd/internal.c +++ b/reactos/subsys/system/cmd/internal.c @@ -340,7 +340,7 @@ INT cmd_chdir (LPTSTR cmd, LPTSTR param) szFinalPath[_tcslen(szFinalPath) - 1] = _T('\0'); /* Handle Root Directory Alone*/ - if (_tcslen(szPath) == 3 && szPath[1] == _T(':')) + if (_tcslen(szFinalPath) == 3 && szFinalPath[1] == _T(':')) { if(!SetRootPath(szFinalPath)) { @@ -377,7 +377,7 @@ INT cmd_chdir (LPTSTR cmd, LPTSTR param) break; _tcscat(szFinalPath,f.cFileName); - + if(IsExistingDirectory(szFinalPath)) { if(!SetRootPath(szFinalPath))