]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
cloud: Fix #10685 TruncateCache at endofjob was not processed due to wrong transfer...
authornorbert.bizet <norbert.bizet@baculasystems.com>
Wed, 17 Jan 2024 17:45:30 +0000 (12:45 -0500)
committerEric Bollengier <eric@baculasystems.com>
Tue, 13 Feb 2024 09:36:03 +0000 (10:36 +0100)
bacula/src/stored/cloud_dev.c

index e743b7d96b0fb5a736ebf13567e4dbc275d72759..571d7209d1f9078db425b2fe76c3cc32d2379753 100644 (file)
@@ -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;