- struct stat stat_data;
- enum archive_format unused;
-
- decode_header (current_header, ¤t_stat, &unused, 0);
- if (stat (current_file_name, &stat_data) < 0)
- ERROR ((0, errno, _("Cannot stat %s"), current_file_name));
- else if (current_stat.st_mtime >= stat_data.st_mtime)
- name->found = 1;
+ struct stat s;
+
+ chdir_do (name->change_dir);
+ if (deref_stat (dereference_option,
+ current_stat_info.file_name, &s) == 0
+ && (tar_timespec_cmp (get_stat_mtime (&s),
+ current_stat_info.mtime)
+ <= 0))
+ add_avoided_name (current_stat_info.file_name);