Add braces to fix wrong if-if-else-if nesting that broke `cp -pR' for
fifos.
This commit is contained in:
parent
d8e3948cc1
commit
439b2b1e9c
10
bin/cp/cp.c
10
bin/cp/cp.c
@ -33,7 +33,7 @@
|
|||||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
* SUCH DAMAGE.
|
* SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
* $Id: cp.c,v 1.3 1994/12/30 13:12:12 bde Exp $
|
* $Id: cp.c,v 1.4 1995/01/25 07:31:01 davidg Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
@ -389,17 +389,19 @@ copy(argv, type, fts_options)
|
|||||||
if (Rflag) {
|
if (Rflag) {
|
||||||
if (copy_special(curr->fts_statp, !dne))
|
if (copy_special(curr->fts_statp, !dne))
|
||||||
rval = 1;
|
rval = 1;
|
||||||
} else
|
} else {
|
||||||
if (copy_file(curr, dne))
|
if (copy_file(curr, dne))
|
||||||
rval = 1;
|
rval = 1;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case S_IFIFO:
|
case S_IFIFO:
|
||||||
if (Rflag)
|
if (Rflag) {
|
||||||
if (copy_fifo(curr->fts_statp, !dne))
|
if (copy_fifo(curr->fts_statp, !dne))
|
||||||
rval = 1;
|
rval = 1;
|
||||||
else
|
} else {
|
||||||
if (copy_file(curr, dne))
|
if (copy_file(curr, dne))
|
||||||
rval = 1;
|
rval = 1;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
if (copy_file(curr, dne))
|
if (copy_file(curr, dne))
|
||||||
|
Loading…
Reference in New Issue
Block a user