Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F108610916
D44805.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
697 B
Referenced Files
None
Subscribers
None
D44805.diff
View Options
diff --git a/bin/cp/cp.c b/bin/cp/cp.c
--- a/bin/cp/cp.c
+++ b/bin/cp/cp.c
@@ -452,13 +452,19 @@
switch (curr->fts_statp->st_mode & S_IFMT) {
case S_IFLNK:
- /* Catch special case of a non-dangling symlink. */
if ((fts_options & FTS_LOGICAL) ||
((fts_options & FTS_COMFOLLOW) &&
curr->fts_level == 0)) {
+ /*
+ * We asked FTS to follow links but got
+ * here anyway, which means the target is
+ * nonexistent or inaccessible. Let
+ * copy_file() deal with the error.
+ */
if (copy_file(curr, dne))
badcp = rval = 1;
- } else {
+ } else {
+ /* Copy the link. */
if (copy_link(curr, !dne))
badcp = rval = 1;
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Jan 27, 9:07 PM (8 h, 18 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16212888
Default Alt Text
D44805.diff (697 B)
Attached To
Mode
D44805: cp: Clarify an obscure comment.
Attached
Detach File
Event Timeline
Log In to Comment