From 9684c2728d35d24b5c6cc431daf87c613170e95a Mon Sep 17 00:00:00 2001 From: Sergey Poznyakoff Date: Fri, 28 Oct 2005 09:28:20 +0000 Subject: [PATCH] (diff_dumpdir): Pass a valid device number to get_directory_contents. --- src/compare.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) 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) { -- 2.44.0