aboutsummaryrefslogtreecommitdiff
path: root/libbb
diff options
context:
space:
mode:
authorbug1 <bug1@69ca8d6d-28ef-0310-b511-8ec308f3f277>2004-04-19 12:28:02 +0000
committerbug1 <bug1@69ca8d6d-28ef-0310-b511-8ec308f3f277>2004-04-19 12:28:02 +0000
commit33eafb2decb7b41883ddd04c6758a06d03216e87 (patch)
treeed5357a634d6d4af065f172e6b2307c47f3a0a07 /libbb
parent03fc9744ed98e8e5ed5d04a46e0f1c3bff61fa84 (diff)
downloadbusybox-w32-33eafb2decb7b41883ddd04c6758a06d03216e87.tar.gz
busybox-w32-33eafb2decb7b41883ddd04c6758a06d03216e87.tar.bz2
busybox-w32-33eafb2decb7b41883ddd04c6758a06d03216e87.zip
Dont try and preserve hard links to directories.
The linux kernel doesnt allow hard links to directories, SUS says its implementation specific. cramfs gives empty directories and 0 length files the same node it makies it difficult to distinguish from hard links. git-svn-id: svn://busybox.net/trunk/busybox@8767 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'libbb')
-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 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
248end: 250end: