From f48a391bbdaee8ad72bcf8fc4222fe5a15cd4fd5 Mon Sep 17 00:00:00 2001 From: Magnus Olsen Date: Tue, 19 Jul 2005 23:36:59 +0000 Subject: [PATCH] Make CMD rember startpath when you change from start drive to another drive. svn path=/trunk/; revision=16653 --- reactos/subsys/system/cmd/cmd.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/reactos/subsys/system/cmd/cmd.c b/reactos/subsys/system/cmd/cmd.c index c735114a49b..da5521a23f8 100644 --- a/reactos/subsys/system/cmd/cmd.c +++ b/reactos/subsys/system/cmd/cmd.c @@ -1533,6 +1533,7 @@ int _main(void) int _main (int argc, char *argv[]) #endif { + TCHAR startPath[MAX_PATH]; CONSOLE_SCREEN_BUFFER_INFO Info; INT nExitCode; #ifdef _UNICODE @@ -1544,7 +1545,9 @@ int _main (int argc, char *argv[]) argv = CommandLineToArgvW(GetCommandLineW(), &argc); #endif #endif - + + GetCurrentDirectory(MAX_PATH,startPath); + _tchdir(startPath); SetFileApisToOEM(); InputCodePage= 0;