From 9fa5f90fbf75833c2b66cc1af63befd0274e9605 Mon Sep 17 00:00:00 2001 From: Edward Tomasz Napierala Date: Sat, 5 Jun 2010 08:50:39 +0000 Subject: [PATCH] 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 --- bin/cp/cp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/bin/cp/cp.c b/bin/cp/cp.c index 0ae57eba590e..86dbb3c04cfb 100644 --- a/bin/cp/cp.c +++ b/bin/cp/cp.c @@ -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))