svn commit: trunk/busybox/shell
vda at busybox.net
vda at busybox.net
Fri Feb 9 17:30:15 UTC 2007
Author: vda
Date: 2007-02-09 09:30:14 -0800 (Fri, 09 Feb 2007)
New Revision: 17841
Log:
msh: fix my buglet
Modified:
trunk/busybox/shell/msh.c
Changeset:
Modified: trunk/busybox/shell/msh.c
===================================================================
--- trunk/busybox/shell/msh.c 2007-02-09 17:28:27 UTC (rev 17840)
+++ trunk/busybox/shell/msh.c 2007-02-09 17:30:14 UTC (rev 17841)
@@ -3157,12 +3157,15 @@
cp = t->words[1];
if (cp == NULL) {
cp = homedir->value;
- if (cp == NULL)
- er = ": no home directory";
- } else if (chdir(cp) < 0)
+ if (cp != NULL)
+ goto do_cd;
+ er = ": no home directory";
+ } else {
+ do_cd:
+ if (chdir(cp) >= 0)
+ return 0;
er = ": bad directory";
- else
- return 0;
+ }
prs(cp != NULL ? cp : "cd");
err(er);
return 1;
More information about the busybox-cvs
mailing list