summaryrefslogtreecommitdiff
path: root/libbb/copy_file.c
diff options
context:
space:
mode:
Diffstat (limited to 'libbb/copy_file.c')
-rw-r--r--libbb/copy_file.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libbb/copy_file.c b/libbb/copy_file.c
index 7ddb9a2..68a1ded 100644
--- a/libbb/copy_file.c
+++ b/libbb/copy_file.c
@@ -242,7 +242,9 @@ int copy_file(const char *source, const char *dest, int flags)
}
#ifdef CONFIG_FEATURE_PRESERVE_HARDLINKS
- add_to_ino_dev_hashtable(&source_stat, dest);
+ if (! S_ISDIR(source_stat.st_mode)) {
+ add_to_ino_dev_hashtable(&source_stat, dest);
+ }
#endif
end: