From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id 418031FF138 for ; Wed, 04 Mar 2026 11:39:11 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 286AA7215; Wed, 4 Mar 2026 11:40:15 +0100 (CET) From: Hannes Laimer To: pbs-devel@lists.proxmox.com Subject: [PATCH proxmox-backup] datastore: don't skip empty namespaces on s3 refresh Date: Wed, 4 Mar 2026 11:39:38 +0100 Message-ID: <20260304103938.42167-1-h.laimer@proxmox.com> X-Mailer: git-send-email 2.47.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1772620755465 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.065 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: RSQDZYVY2BDPGJM6RDCW63H4XARUM2QN X-Message-ID-Hash: RSQDZYVY2BDPGJM6RDCW63H4XARUM2QN X-MailFrom: h.laimer@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox Backup Server development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Without this empty namespaces present on s3 won't be visible locally. Signed-off-by: Hannes Laimer --- pbs-datastore/src/datastore.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pbs-datastore/src/datastore.rs b/pbs-datastore/src/datastore.rs index 7ad3d917..4749319a 100644 --- a/pbs-datastore/src/datastore.rs +++ b/pbs-datastore/src/datastore.rs @@ -2535,6 +2535,15 @@ impl DataStore { format!("failed to strip store context prefix {store_prefix} for {object_key}") })?; if object_path.ends_with(NAMESPACE_MARKER_FILENAME) { + // Ensure the marker's parent directory exists so the namespace is visible locally + let ns_dir = tmp_base.join(object_path); + if let Some(parent) = ns_dir.parent() { + proxmox_sys::fs::create_path( + parent, + Some(dir_create_options), + Some(dir_create_options), + )?; + } continue; } -- 2.47.3