Changeset 1309 in kBuild for trunk/src/kmk/kmkbuiltin/cp.c
- Timestamp:
- Dec 2, 2007 4:53:40 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kmk/kmkbuiltin/cp.c
r1287 r1309 363 363 return err(1, "fts_open"); 364 364 for (badcp = rval = 0; (curr = fts_read(ftsp)) != NULL; badcp = 0) { 365 int copied = 0; 366 365 367 switch (curr->fts_info) { 366 368 case FTS_NS: … … 511 513 ((fts_options & FTS_COMFOLLOW) && 512 514 curr->fts_level == 0)) { 513 if (copy_file(curr, dne ))515 if (copy_file(curr, dne, cp_changed_only, &copied)) 514 516 badcp = rval = 1; 515 517 } else { … … 558 560 badcp = rval = 1; 559 561 } else { 560 if (copy_file(curr, dne ))562 if (copy_file(curr, dne, cp_changed_only, &copied)) 561 563 badcp = rval = 1; 562 564 } … … 569 571 badcp = rval = 1; 570 572 } else { 571 if (copy_file(curr, dne ))573 if (copy_file(curr, dne, cp_changed_only, &copied)) 572 574 badcp = rval = 1; 573 575 } 574 576 break; 575 577 default: 576 if (copy_file(curr, dne ))578 if (copy_file(curr, dne, cp_changed_only, &copied)) 577 579 badcp = rval = 1; 578 580 break; 579 581 } 580 582 if (vflag && !badcp) 581 (void)printf("%s -> %s\n", curr->fts_path, to.p_path); 583 (void)printf(copied ? "%s -> %s\n" : "%s matches %s - not copied\n", 584 curr->fts_path, to.p_path); 582 585 } 583 586 if (errno)
Note:
See TracChangeset
for help on using the changeset viewer.