diff options
Diffstat (limited to 'commands/ls.c')
-rw-r--r-- | commands/ls.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/commands/ls.c b/commands/ls.c index 278a8bcad2..070aa9002b 100644 --- a/commands/ls.c +++ b/commands/ls.c @@ -68,7 +68,7 @@ int ls(const char *path, ulong flags) if (stat(tmp, &s)) goto out; if (flags & LS_COLUMN) - string_list_add(&sl, d->d_name); + string_list_add_sorted(&sl, d->d_name); else ls_one(d->d_name, &s); } @@ -156,7 +156,7 @@ static int do_ls(struct command *cmdtp, int argc, char *argv[]) if (!(s.st_mode & S_IFDIR)) { if (flags & LS_COLUMN) - string_list_add(&sl, argv[o]); + string_list_add_sorted(&sl, argv[o]); else ls_one(argv[o], &s); } |