aboutsummaryrefslogtreecommitdiff
path: root/coreutils
diff options
context:
space:
mode:
Diffstat (limited to 'coreutils')
-rw-r--r--coreutils/ls.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/coreutils/ls.c b/coreutils/ls.c
index a858a3217..6e0a52d75 100644
--- a/coreutils/ls.c
+++ b/coreutils/ls.c
@@ -1045,7 +1045,7 @@ static void scan_and_display_dirs_recur(struct dnode **dn, int first)
1045 1045
1046 1046
1047int ls_main(int argc UNUSED_PARAM, char **argv) 1047int ls_main(int argc UNUSED_PARAM, char **argv)
1048{ 1048{ /* ^^^^^^^^^^^^^^^^^ note: if FTPD, argc can be wrong, see ftpd.c */
1049 struct dnode **dnd; 1049 struct dnode **dnd;
1050 struct dnode **dnf; 1050 struct dnode **dnf;
1051 struct dnode **dnp; 1051 struct dnode **dnp;
@@ -1175,6 +1175,11 @@ int ls_main(int argc UNUSED_PARAM, char **argv)
1175 if (!(option_mask32 & (OPT_l|OPT_1|OPT_x|OPT_C))) 1175 if (!(option_mask32 & (OPT_l|OPT_1|OPT_x|OPT_C)))
1176 option_mask32 |= (isatty(STDOUT_FILENO) ? OPT_C : OPT_1); 1176 option_mask32 |= (isatty(STDOUT_FILENO) ? OPT_C : OPT_1);
1177 1177
1178 if (ENABLE_FTPD && applet_name[0] == 'f') {
1179 /* ftpd secret backdoor. dirs first are much nicer */
1180 option_mask32 |= OPT_dirs_first;
1181 }
1182
1178 argv += optind; 1183 argv += optind;
1179 if (!argv[0]) 1184 if (!argv[0])
1180 *--argv = (char*)"."; 1185 *--argv = (char*)".";