OSDN Git Service
(root)
/
android-x86
/
external-toybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dd4d83e
)
We don't open a destination filehandle for symlinks, so xclose() would barf.
author
Rob Landley
<rob@landley.net>
Thu, 10 Apr 2008 03:24:36 +0000
(22:24 -0500)
committer
Rob Landley
<rob@landley.net>
Thu, 10 Apr 2008 03:24:36 +0000
(22:24 -0500)
toys/cp.c
patch
|
blob
|
history
diff --git
a/toys/cp.c
b/toys/cp.c
index
81a1e41
..
04c6369
100644
(file)
--- a/
toys/cp.c
+++ b/
toys/cp.c
@@
-87,6
+87,7
@@
void cp_file(char *src, char *dst, struct stat *srcst)
// filehandle to them? O_NOFOLLOW causes the open to fail.
if (!link || symlink(link, dst)) perror_msg("link '%s'", dst);
free(link);
+ return;
} else if (toys.optflags & FLAG_l) {
if (link(src, dst)) perror_msg("link '%s'");
return;