- if (S_ISDIR (stat_data.st_mode))
- {
- bool nfs = NFS_FILE_STAT (stat_data);
-
- if (directory = find_directory (name_buffer), directory)
- {
- /* With NFS, the same file can have two different devices
- if an NFS directory is mounted in multiple locations,
- which is relatively common when automounting.
- To avoid spurious incremental redumping of
- directories, consider all NFS devices as equal,
- relying on the i-node to establish differences. */
-
- if (! (((directory->nfs & nfs)
- || directory->device_number == stat_data.st_dev)
- && directory->inode_number == stat_data.st_ino))
- {
- if (verbose_option)
- WARN ((0, 0, _("%s: Directory has been renamed"),
- quotearg_colon (name_buffer)));
- directory->children = ALL_CHILDREN;
- directory->nfs = nfs;
- directory->device_number = stat_data.st_dev;
- directory->inode_number = stat_data.st_ino;
- }
- directory->found = 1;
- }
- else
- {
- if (verbose_option)
- WARN ((0, 0, _("%s: Directory is new"),
- quotearg_colon (name_buffer)));
- directory = note_directory (name_buffer,
- stat_data.st_dev,
- stat_data.st_ino, nfs, 1);
- directory->children =
- ((listed_incremental_option
- || newer_mtime_option <= stat_data.st_mtime
- || (after_date_option &&
- newer_ctime_option <= stat_data.st_ctime))
- ? ALL_CHILDREN
- : CHANGED_CHILDREN);
- }
-
- if (one_file_system_option && device != stat_data.st_dev)
- directory->children = NO_CHILDREN;
- else if (children == ALL_CHILDREN)
- directory->children = ALL_CHILDREN;
-
- add_to_accumulator (accumulator, "D", 1);
- }