From: Sergey Poznyakoff Date: Fri, 28 Oct 2005 09:28:20 +0000 (+0000) Subject: (diff_dumpdir): Pass a valid device number to get_directory_contents. X-Git-Url: https://git.brokenzipper.com/gitweb?a=commitdiff_plain;h=9684c2728d35d24b5c6cc431daf87c613170e95a;p=chaz%2Ftar (diff_dumpdir): Pass a valid device number to get_directory_contents. --- diff --git a/src/compare.c b/src/compare.c index 02240aa..70d7251 100644 --- a/src/compare.c +++ b/src/compare.c @@ -356,8 +356,21 @@ diff_special (void) static void diff_dumpdir (void) { - char *dumpdir_buffer = get_directory_contents (current_stat_info.file_name, - 0); + char *dumpdir_buffer; + dev_t dev = 0; + struct stat stat; + + if (deref_stat (true, current_stat_info.file_name, &stat)) + { + if (errno == ENOENT) + stat_warn (current_stat_info.file_name); + else + stat_error (current_stat_info.file_name); + } + else + dev = stat.st_dev; + + dumpdir_buffer = get_directory_contents (current_stat_info.file_name, dev); if (multi_volume_option) {