From: "Fabian Grünbichler" <f.gruenbichler@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [PATCH proxmox-backup 2/3] pull: do not allow archive fetching to return no archive
Date: Mon, 27 Apr 2026 10:49:48 +0200 [thread overview]
Message-ID: <20260427084952.303245-3-f.gruenbichler@proxmox.com> (raw)
In-Reply-To: <20260427084952.303245-1-f.gruenbichler@proxmox.com>
allowing Ok(None) here only makes sense for manifests (where we can treat this
as a disappeared snapshot).
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
---
src/server/pull.rs | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/server/pull.rs b/src/server/pull.rs
index 020dbf508..d7455c2ee 100644
--- a/src/server/pull.rs
+++ b/src/server/pull.rs
@@ -447,10 +447,14 @@ async fn pull_single_archive<'a>(
.log(Level::INFO, format!("{archive_prefix}: sync archive"))
.await?;
- reader
+ if reader
.load_file_into(archive_name, &tmp_path)
.await
- .with_context(|| archive_prefix.clone())?;
+ .with_context(|| archive_prefix.clone())?
+ .is_none()
+ {
+ bail!("Failed to load archive {archive_name}");
+ };
let mut tmpfile = std::fs::OpenOptions::new()
.read(true)
--
2.47.3
next prev parent reply other threads:[~2026-04-27 8:50 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-27 8:49 [PATCH proxmox-backup 0/3] sync: clean up manifest/archive load handling Fabian Grünbichler
2026-04-27 8:49 ` [PATCH proxmox-backup 1/3] sync: return File in load_file_into Fabian Grünbichler
2026-04-27 8:49 ` Fabian Grünbichler [this message]
2026-04-27 8:49 ` [PATCH proxmox-backup 3/3] pull: move logging of disappeared snapshots Fabian Grünbichler
2026-04-27 9:04 ` [PATCH proxmox-backup 0/3] sync: clean up manifest/archive load handling Fabian Grünbichler
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260427084952.303245-3-f.gruenbichler@proxmox.com \
--to=f.gruenbichler@proxmox.com \
--cc=pbs-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox