projects
/
platform
/
upstream
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c6a99b9
)
Dont try and preserve hard links to directories.
author
Glenn L McGrath
<bug1@ihug.co.nz>
Mon, 19 Apr 2004 12:28:02 +0000
(12:28 -0000)
committer
Glenn L McGrath
<bug1@ihug.co.nz>
Mon, 19 Apr 2004 12:28:02 +0000
(12:28 -0000)
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.
libbb/copy_file.c
patch
|
blob
|
history
diff --git
a/libbb/copy_file.c
b/libbb/copy_file.c
index
7ddb9a2
..
68a1ded
100644
(file)
--- 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: