https://git.reactos.org/?p=reactos.git;a=commitdiff;h=1b7732093c241772a36a2a5b5161e95e9e18feac

commit 1b7732093c241772a36a2a5b5161e95e9e18feac
Author:     Katayama Hirofumi MZ <[email protected]>
AuthorDate: Fri Nov 15 11:51:58 2019 +0900
Commit:     GitHub <[email protected]>
CommitDate: Fri Nov 15 11:51:58 2019 +0900

    [CMD] Unquote string at pushd (#2031)
    
    pushd command of cmd.exe didn't treat the quoted parameter correctly.
    - Call StripQuotes in SetRootPath function.
    - Fix typo of FEATURE_DIRECTORY_STACK.
    This PR will enable "Command Prompt" here. CORE-12150
---
 base/shell/cmd/cmd.c      | 2 +-
 base/shell/cmd/internal.c | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/base/shell/cmd/cmd.c b/base/shell/cmd/cmd.c
index 27b5bf5a20b..5a3651d935f 100644
--- a/base/shell/cmd/cmd.c
+++ b/base/shell/cmd/cmd.c
@@ -1872,7 +1872,7 @@ Initialize(VOID)
     /* Initialize prompt support */
     InitPrompt();
 
-#ifdef FEATURE_DIR_STACK
+#ifdef FEATURE_DIRECTORY_STACK
     /* Initialize directory stack */
     InitDirectoryStack();
 #endif
diff --git a/base/shell/cmd/internal.c b/base/shell/cmd/internal.c
index fc05119829e..d758c151a4c 100644
--- a/base/shell/cmd/internal.c
+++ b/base/shell/cmd/internal.c
@@ -184,6 +184,8 @@ BOOL SetRootPath(TCHAR *oldpath, TCHAR *InPath)
     TCHAR OutPath[MAX_PATH];
     TCHAR OutPathTemp[MAX_PATH];
 
+    StripQuotes(InPath);
+
     /* Retrieve the full path name from the (possibly relative) InPath */
     if (GetFullPathName(InPath, MAX_PATH, OutPathTemp, NULL) == 0)
         goto Fail;

Reply via email to