Shell: some small fixes

git-svn-id: svn://kolibrios.org@2615 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Albom
2012-04-15 07:59:47 +00:00
parent ba80d953e5
commit f0c414780c
4 changed files with 22 additions and 2 deletions

View File

@@ -26,9 +26,12 @@ if ( '/' == cmd[0]) //
else
{
strcpy(exec, cur_dir); // ¯à®¢¥à塞 ä ©« ¢ ⥪ã饬 ª â «®£¥
// strcat(exec, "/"); // add slash
if (exec[strlen(exec)-1] != '/')
strcat(exec, "/"); // add slash
strcat(exec, cmd);
printf("\n%s\n", exec);
if ( !file_check(exec) ) // ¯à®¢¥à塞 áãé¥á⢮¢ ­¨¥ ä ©« 
{
strcpy(exec, "/rd/1/"); // ¯à®¢¥à塞 ä ©« ­  ¢¨àâã «ì­®¬ ¤¨áª¥