main: fix unintended reset of syncstatus

This commit is contained in:
Thomas Schoebel-Theuer 2017-01-16 08:24:02 +01:00
parent 300881a308
commit fec2264766
1 changed files with 1 additions and 0 deletions

View File

@ -833,6 +833,7 @@ int _set_copy_params(struct mars_brick *_brick, void *private)
copy_brick->copy_last = copy_brick->copy_start;
if (cc->start_pos != -1) {
copy_brick->copy_start = cc->start_pos;
copy_brick->copy_last = copy_brick->copy_start;
if (unlikely(cc->start_pos > cc->info[0].current_size)) {
MARS_ERR("bad start position %lld is larger than actual size %lld on '%s'\n", cc->start_pos, cc->info[0].current_size, cc->copy_path);
status = -EINVAL;