- /* If the directory is on another device and --one-file-system was given,
- omit it... */
- if (one_file_system_option && device != stat_data->st_dev
- /* ... except if it was explicitely given in the command line */
- && !is_individual_file (name_buffer))
- /* FIXME:
- WARNOPT (WARN_XDEV,
- (0, 0,
- _("%s: directory is on a different filesystem; not dumped"),
- quotearg_colon (directory->name)));
- */
- directory->children = NO_CHILDREN;
+ if (one_file_system_option && st->parent
+ && stat_data->st_dev != st->parent->stat.st_dev)
+ {
+ WARNOPT (WARN_XDEV,
+ (0, 0,
+ _("%s: directory is on a different filesystem; not dumped"),
+ quotearg_colon (directory->name)));
+ directory->children = NO_CHILDREN;
+ /* If there is any dumpdir info in that directory, remove it */
+ if (directory->dump)
+ {
+ dumpdir_free (directory->dump);
+ directory->dump = NULL;
+ }
+ perhaps_renamed = false;
+ }
+