From 94572b7fe19e573f229c3c5fc10bc988fa34d75f Mon Sep 17 00:00:00 2001 From: Albom Date: Thu, 15 Dec 2011 18:06:01 +0000 Subject: [PATCH] Shell: cd command fixed git-svn-id: svn://kolibrios.org@2323 a494cfbc-eb01-0410-851d-a64ba20cac60 --- programs/system/shell/cmd/cmd_cd.c | 3 +++ programs/system/shell/compile_eng.bat | 2 +- programs/system/shell/compile_rus.bat | 2 +- programs/system/shell/globals.h | 2 +- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/programs/system/shell/cmd/cmd_cd.c b/programs/system/shell/cmd/cmd_cd.c index ff9b2bd75a..4eae740746 100644 --- a/programs/system/shell/cmd/cmd_cd.c +++ b/programs/system/shell/cmd/cmd_cd.c @@ -37,10 +37,13 @@ if ( '/' == dir[0]) else { strcpy(temp, cur_dir); + if (cur_dir[strlen(cur_dir)-1] != '/') + strcat(temp, "/"); strcat(temp, dir); if ( dir_check(temp) ) { + strcpy(cur_dir, temp); return TRUE; } diff --git a/programs/system/shell/compile_eng.bat b/programs/system/shell/compile_eng.bat index 1ef184b56e..03f858424a 100644 --- a/programs/system/shell/compile_eng.bat +++ b/programs/system/shell/compile_eng.bat @@ -1,5 +1,5 @@ @echo off -erase shell.kex lang.h +erase lang.h echo #define LANG_ENG 1 > lang.h fasm start.asm start.o gcc -c shell.c diff --git a/programs/system/shell/compile_rus.bat b/programs/system/shell/compile_rus.bat index f1b18b94c1..cf5caa6cbe 100644 --- a/programs/system/shell/compile_rus.bat +++ b/programs/system/shell/compile_rus.bat @@ -1,5 +1,5 @@ @echo off -erase shell.kex lang.h +erase lang.h echo #define LANG_RUS 1 > lang.h fasm start.asm start.o gcc -c shell.c diff --git a/programs/system/shell/globals.h b/programs/system/shell/globals.h index a5ce183703..23160f3d59 100644 --- a/programs/system/shell/globals.h +++ b/programs/system/shell/globals.h @@ -1,5 +1,5 @@ -#define SHELL_VERSION "0.4.9" +#define SHELL_VERSION "0.4.91" extern char PATH[256]; extern char PARAM[256];