diff options
-rw-r--r-- | libbb/copy_file.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libbb/copy_file.c b/libbb/copy_file.c index 7ddb9a23f..68a1ded04 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) | |||
242 | } | 242 | } |
243 | 243 | ||
244 | #ifdef CONFIG_FEATURE_PRESERVE_HARDLINKS | 244 | #ifdef CONFIG_FEATURE_PRESERVE_HARDLINKS |
245 | add_to_ino_dev_hashtable(&source_stat, dest); | 245 | if (! S_ISDIR(source_stat.st_mode)) { |
246 | add_to_ino_dev_hashtable(&source_stat, dest); | ||
247 | } | ||
246 | #endif | 248 | #endif |
247 | 249 | ||
248 | end: | 250 | end: |