diff options
author | Glenn L McGrath <bug1@ihug.co.nz> | 2004-01-18 05:41:30 +0000 |
---|---|---|
committer | Glenn L McGrath <bug1@ihug.co.nz> | 2004-01-18 05:41:30 +0000 |
commit | 65b6d8bdb6375c010d70f7aad399dae7c3ec15f6 (patch) | |
tree | ed64fecaace11212bd4f2ee36df77f34a04f5449 | |
parent | 792cae5f2a234c00c8c79783e2474135e0a78554 (diff) | |
download | busybox-w32-65b6d8bdb6375c010d70f7aad399dae7c3ec15f6.tar.gz busybox-w32-65b6d8bdb6375c010d70f7aad399dae7c3ec15f6.tar.bz2 busybox-w32-65b6d8bdb6375c010d70f7aad399dae7c3ec15f6.zip |
Fix a bug where `ls -le` would print the time twice.
-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 |