SHELL: fix for #3988

git-svn-id: svn://kolibrios.org@4109 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Kirill Lipatov (Leency) 2013-10-26 23:26:02 +00:00
parent a4ff20fb1d
commit 0ea10be928

View File

@ -129,18 +129,18 @@ con_set_cursor_height(con_get_font_height()-1);
ALIASES = malloc(128*1024); ALIASES = malloc(128*1024);
if (PARAM[0] == 0) if (PARAM[0] == 0)
{ {
strcpy(CMD, cur_dir); strcpy(CMD, cur_dir);
strcat(CMD, ".shell"); strcat(CMD, ".shell");
if ( !file_check(CMD) ) if ( !file_check(CMD) )
strcpy(CMD, "/sys/settings/.shell"); strcpy(CMD, "/sys/settings/.shell");
} }
else else
{ {
if (PARAM[0] == '/') if (PARAM[0] == '/')
{ {
strcpy(cur_dir, PARAM); strcpy(cur_dir, PARAM);
*strrchr(cur_dir, '/')=0; *(strrchr(cur_dir, '/')+1)=0;
} }
strcpy(CMD, PARAM); strcpy(CMD, PARAM);
} }