ls: fix "ls | cat" to not show "total NNN" header
authorDenys Vlasenko <vda.linux@googlemail.com>
Fri, 23 Oct 2009 14:22:25 +0000 (16:22 +0200)
committerDenys Vlasenko <vda.linux@googlemail.com>
Fri, 23 Oct 2009 14:22:25 +0000 (16:22 +0200)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
coreutils/ls.c

index 38cabcab606491fafe3ccce7443282839b89f3b7..13c863c6eb0bb918efa102c8a49554679829163f 100644 (file)
@@ -633,7 +633,7 @@ static void showdirs(struct dnode **dn, int first)
                }
                subdnp = list_dir((*dn)->fullname, &nfiles);
 #if ENABLE_DESKTOP
-               if (all_fmt & STYLE_LONG)
+               if ((all_fmt & STYLE_MASK) == STYLE_LONG)
                        printf("total %"OFF_FMT"u\n", calculate_blocks(subdnp));
 #endif
                if (nfiles > 0) {