- default:
- ERROR ((0, 0, _("%s: Unknown file type '%c', diffed as normal file"),
- quotearg_colon (current_stat_info.file_name),
- current_header->header.typeflag));
- /* Fall through. */
-
- case AREGTYPE:
- case REGTYPE:
- case GNUTYPE_SPARSE:
- case CONTTYPE:
-
- /* Appears to be a file. See if it's really a directory. */
-
- if (current_stat_info.had_trailing_slash)
- goto really_dir;
-
- if (!get_stat_data (current_stat_info.file_name, &stat_data))
+ if ((current_stat_info.stat.st_mode & MODE_ALL) !=
+ (stat_data.st_mode & MODE_ALL))
+ report_difference (¤t_stat_info, _("Mode differs"));
+
+ if (!sys_compare_uid (&stat_data, ¤t_stat_info.stat))
+ report_difference (¤t_stat_info, _("Uid differs"));
+ if (!sys_compare_gid (&stat_data, ¤t_stat_info.stat))
+ report_difference (¤t_stat_info, _("Gid differs"));
+
+ if (tar_timespec_cmp (get_stat_mtime (&stat_data),
+ current_stat_info.mtime))
+ report_difference (¤t_stat_info, _("Mod time differs"));
+ if (current_header->header.typeflag != GNUTYPE_SPARSE
+ && stat_data.st_size != current_stat_info.stat.st_size)