diff --git a/programs/system/shell/cmd/cmd_cd.c b/programs/system/shell/cmd/cmd_cd.c index 9fed95e904..7a1fcde5bc 100644 --- a/programs/system/shell/cmd/cmd_cd.c +++ b/programs/system/shell/cmd/cmd_cd.c @@ -16,10 +16,10 @@ if (NULL == dir) return TRUE; } -if ( 0 == strcmp(dir, ".") ) - return FALSE; +if ( 0 == strcmp(dir, ".") || 0 == strcmp(dir, "./") ) + return TRUE; -if ( ( 0 == strcmp(dir, "..") ) && ( 0 != strcmp(cur_dir, "/")) ) +if ( ( 0 == strcmp(dir, "..") || 0 == strcmp(dir, "../") ) && ( 0 != strcmp(cur_dir, "/")) ) { cur_dir[strlen(cur_dir)-1]='\0'; dir_truncate(cur_dir); diff --git a/programs/system/shell/globals.h b/programs/system/shell/globals.h index b27c30316d..35c7f23dae 100644 --- a/programs/system/shell/globals.h +++ b/programs/system/shell/globals.h @@ -1,5 +1,5 @@ -#define SHELL_VERSION "0.8" +#define SHELL_VERSION "0.8a" extern char PATH[256]; extern char PARAM[256];