1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2026-01-16 10:11:01 +00:00

cp: fix preserved hardlinks are not reported in --verbose

This commit is contained in:
Moïse Valvassori 2024-06-26 06:44:55 +02:00
parent 92665144c9
commit 2e223dfdfc
2 changed files with 34 additions and 4 deletions

View file

@ -2108,6 +2108,10 @@ fn copy_file(
.into());
}
if options.verbose {
print_verbose_output(options.parents, progress_bar, source, dest);
}
if options.preserve_hard_links() {
// if we encounter a matching device/inode pair in the source tree
// we can arrange to create a hard link between the corresponding names
@ -2121,10 +2125,6 @@ fn copy_file(
};
}
if options.verbose {
print_verbose_output(options.parents, progress_bar, source, dest);
}
// Calculate the context upfront before canonicalizing the path
let context = context_for(source, dest);
let context = context.as_str();