X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2Fcreate.c;h=5292f82c6ed1224a6bfabe9f1401af5012651954;hb=143e677b5e8f5167ab8b7d711192f7558a4129b6;hp=547d7e9b2de275de222681c1925970407a0f15ff;hpb=2632f1c8d2f89a755767320c7caea18dd7b5a55c;p=chaz%2Ftar diff --git a/src/create.c b/src/create.c index 547d7e9..5292f82 100644 --- a/src/create.c +++ b/src/create.c @@ -981,9 +981,11 @@ dump_dir0 (char *directory, return; } } - else if (!recursion_option) + + if (!recursion_option) return; - else if (one_file_system_option + + if (one_file_system_option && !top_level && parent_device != stat->stat.st_dev) { @@ -1179,7 +1181,7 @@ dump_hard_link (struct tar_stat_info *stat) if ((dup = hash_lookup (link_table, &lp))) { /* We found a link. */ - char const *link_name = safer_name_suffix (dup->name, 1); + char const *link_name = safer_name_suffix (dup->name, true); dup->nlink--; @@ -1275,7 +1277,7 @@ dump_file0 (struct tar_stat_info *stat, char *p, return; assign_string (&stat->orig_file_name, p); - assign_string (&stat->file_name, safer_name_suffix (p, 0)); + assign_string (&stat->file_name, safer_name_suffix (p, false)); if (deref_stat (dereference_option, p, &stat->stat) != 0) { @@ -1283,7 +1285,7 @@ dump_file0 (struct tar_stat_info *stat, char *p, return; } stat->archive_file_size = stat->stat.st_size; - + sys_stat_nanoseconds(stat); original_ctime = stat->stat.st_ctime; restore_times.actime = stat->stat.st_atime; restore_times.modtime = stat->stat.st_mtime;