- open_error (current_stat_info.file_name);
- skip_member ();
- report_difference (¤t_stat_info, NULL);
- goto quit;
+ diff_handle = openat (chdir_fd, file_name, open_read_flags);
+
+ if (diff_handle < 0)
+ {
+ open_error (file_name);
+ skip_member ();
+ report_difference (¤t_stat_info, NULL);
+ }
+ else
+ {
+ int status;
+
+ if (current_stat_info.is_sparse)
+ sparse_diff_file (diff_handle, ¤t_stat_info);
+ else
+ read_and_process (¤t_stat_info, process_rawdata);
+
+ if (atime_preserve_option == replace_atime_preserve
+ && stat_data.st_size != 0)
+ {
+ struct timespec atime = get_stat_atime (&stat_data);
+ if (set_file_atime (diff_handle, chdir_fd, file_name, atime)
+ != 0)
+ utime_error (file_name);
+ }
+
+ status = close (diff_handle);
+ if (status != 0)
+ close_error (file_name);
+ }