Tito writes:
[oweals/busybox.git] / libbb / copy_file.c
index 7ddb9a23fb745ad358bc8562c372246fd0b6bf95..68a1ded04ae99df2aa7bfc5d0717f0e290e877e3 100644 (file)
@@ -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: