diff options
author | Rob Landley <rob@landley.net> | 2008-04-09 22:24:36 -0500 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2008-04-09 22:24:36 -0500 |
commit | f639c65ac49b97fdf2445f6ba79da66eb986e925 (patch) | |
tree | 29231fa0139b07b208c5ad64325a711e51f88bff /toys | |
parent | dd4d83e58135c7f75f5cf0103cd4c6ced4e86c84 (diff) | |
download | toybox-f639c65ac49b97fdf2445f6ba79da66eb986e925.tar.gz |
We don't open a destination filehandle for symlinks, so xclose() would barf.
Diffstat (limited to 'toys')
-rw-r--r-- | toys/cp.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -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; |