diff options
| author | bug1 <bug1@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2004-01-18 05:41:30 +0000 |
|---|---|---|
| committer | bug1 <bug1@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2004-01-18 05:41:30 +0000 |
| commit | e058e5d9e63f1b362d262d43e4296f6da2fffb50 (patch) | |
| tree | ed64fecaace11212bd4f2ee36df77f34a04f5449 /coreutils | |
| parent | 41e359fdd93b37d382160ea3b7aba222c6ef24f5 (diff) | |
| download | busybox-w32-e058e5d9e63f1b362d262d43e4296f6da2fffb50.tar.gz busybox-w32-e058e5d9e63f1b362d262d43e4296f6da2fffb50.tar.bz2 busybox-w32-e058e5d9e63f1b362d262d43e4296f6da2fffb50.zip | |
Fix a bug where `ls -le` would print the time twice.
git-svn-id: svn://busybox.net/trunk/busybox@8312 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'coreutils')
| -rw-r--r-- | coreutils/ls.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/coreutils/ls.c b/coreutils/ls.c index 18cffb13e..2f81ee05a 100644 --- a/coreutils/ls.c +++ b/coreutils/ls.c | |||
| @@ -717,21 +717,21 @@ static int list_single(struct dnode *dn) | |||
| 717 | break; | 717 | break; |
| 718 | #ifdef CONFIG_FEATURE_LS_TIMESTAMPS | 718 | #ifdef CONFIG_FEATURE_LS_TIMESTAMPS |
| 719 | case LIST_FULLTIME: | 719 | case LIST_FULLTIME: |
| 720 | printf("%24.24s ", filetime); | ||
| 721 | column += 25; | ||
| 722 | break; | ||
| 720 | case LIST_DATE_TIME: | 723 | case LIST_DATE_TIME: |
| 721 | if (all_fmt & LIST_FULLTIME) { | 724 | if ((all_fmt & LIST_FULLTIME) == 0) { |
| 722 | printf("%24.24s ", filetime); | 725 | age = time(NULL) - ttime; |
| 723 | column += 25; | 726 | printf("%6.6s ", filetime + 4); |
| 724 | break; | 727 | if (age < 3600L * 24 * 365 / 2 && age > -15 * 60) { |
| 725 | } | 728 | /* hh:mm if less than 6 months old */ |
| 726 | age = time(NULL) - ttime; | 729 | printf("%5.5s ", filetime + 11); |
| 727 | printf("%6.6s ", filetime + 4); | 730 | } else { |
| 728 | if (age < 3600L * 24 * 365 / 2 && age > -15 * 60) { | 731 | printf(" %4.4s ", filetime + 20); |
| 729 | /* hh:mm if less than 6 months old */ | 732 | } |
| 730 | printf("%5.5s ", filetime + 11); | 733 | column += 13; |
| 731 | } else { | ||
| 732 | printf(" %4.4s ", filetime + 20); | ||
| 733 | } | 734 | } |
| 734 | column += 13; | ||
| 735 | break; | 735 | break; |
| 736 | #endif | 736 | #endif |
| 737 | #ifdef CONFIG_SELINUX | 737 | #ifdef CONFIG_SELINUX |
