From: norbert.bizet Date: Wed, 17 Jan 2024 17:45:30 +0000 (-0500) Subject: cloud: Fix #10685 TruncateCache at endofjob was not processed due to wrong transfer... X-Git-Tag: Beta-15.0.1~14 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a1759e19e2680c544ab7211b7475f1d425a8a83c;p=thirdparty%2Fbacula.git cloud: Fix #10685 TruncateCache at endofjob was not processed due to wrong transfer status verification --- diff --git a/bacula/src/stored/cloud_dev.c b/bacula/src/stored/cloud_dev.c index e743b7d96..571d7209d 100644 --- a/bacula/src/stored/cloud_dev.c +++ b/bacula/src/stored/cloud_dev.c @@ -280,7 +280,7 @@ transfer_state upload_engine(transfer *tpkt) if (tpkt->m_do_cache_truncate && tpkt->m_part!=1) { bool allow_truncate = false; uint64_t cloud_size = 0; - if (tpkt->m_state == TRANS_STATE_DONE && tpkt->m_res_size != 0 && tpkt->m_res_mtime != 0) { + if (tpkt->m_state == TRANS_STATE_PROCESSED && tpkt->m_res_size != 0 && tpkt->m_res_mtime != 0) { /* so far so good for truncation */ /* double check if the cache size matches the transfer size */ struct stat statbuf;