Don't try to copy a socket after "xxx is a socket (not copied)." message.

Previously, it would either try to copy it anyway and fail (without -R),
or create fifo instead of the socket (with -R).

Found with:	Coverity Prevent
CID:		5623
MFC after:	2 weeks
This commit is contained in:
Edward Tomasz Napierala 2010-06-05 08:50:39 +00:00
parent c25d9e1d96
commit 9fa5f90fbf
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=208821

View File

@ -466,6 +466,7 @@ copy(char *argv[], enum op type, int fts_options)
case S_IFSOCK:
warnx("%s is a socket (not copied).",
curr->fts_path);
break;
case S_IFIFO:
if (Rflag) {
if (copy_fifo(curr->fts_statp, !dne))