fix stat output

This commit is contained in:
Ryo Nakamura
2022-10-23 00:14:28 +09:00
parent 3a22043f41
commit ec785ff33e
2 changed files with 17 additions and 14 deletions

View File

@@ -724,8 +724,10 @@ int chunk_copy(struct chunk *c, sftp_session sftp, size_t buf_sz, size_t *counte
if (ret < 0)
return ret;
if (refcnt_dec(&f->refcnt) == 0)
if (refcnt_dec(&f->refcnt) == 0) {
f->state = FILE_STATE_DONE;
pr("copy done: %s\n", f->path);
}
return ret;
}