]> Dogcows Code - chaz/tar/commitdiff
(print_header): Print UID/GID in case of
authorSergey Poznyakoff <gray@gnu.org.ua>
Thu, 3 Mar 2005 23:13:04 +0000 (23:13 +0000)
committerSergey Poznyakoff <gray@gnu.org.ua>
Thu, 3 Mar 2005 23:13:04 +0000 (23:13 +0000)
empty user/group name. This could occur when dumping
files belonging to non-existing users and when listing
broken archives.
Reported by Igor Lautar.

src/list.c

index baee9e88b493d23993e5e44194e1737e682517fd..0657fcff036492fd4f9367de5303e9e2b0dccc12 100644 (file)
@@ -1098,7 +1098,9 @@ print_header (struct tar_stat_info *st, off_t block_ordinal)
 
       /* User and group names.  */
 
-      if (st->uname && current_format != V7_FORMAT
+      if (st->uname
+         && st->uname[0]
+         && current_format != V7_FORMAT
          && !numeric_owner_option)
        user = st->uname;
       else
@@ -1121,7 +1123,9 @@ print_header (struct tar_stat_info *st, off_t block_ordinal)
            }
        }
 
-      if (st->gname && current_format != V7_FORMAT
+      if (st->gname
+         && st->gname[0]
+         && current_format != V7_FORMAT
          && !numeric_owner_option)
        group = st->gname;
       else
This page took 0.025445 seconds and 4 git commands to generate.