datastore: include namespace in full_path

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Wolfgang Bumiller 2022-04-25 10:58:46 +02:00 committed by Thomas Lamprecht
parent 33f2c2a1bf
commit 13d6de3787
1 changed files with 4 additions and 0 deletions

View File

@ -335,6 +335,10 @@ impl BackupDir {
/// Returns the absolute path for backup_dir, using the cached formatted time string. /// Returns the absolute path for backup_dir, using the cached formatted time string.
pub fn full_path(&self) -> PathBuf { pub fn full_path(&self) -> PathBuf {
let mut base_path = self.store.base_path(); let mut base_path = self.store.base_path();
for ns in self.dir.group.ns.components() {
base_path.push("ns");
base_path.push(ns);
}
base_path.push(self.dir.group.ty.as_str()); base_path.push(self.dir.group.ty.as_str());
base_path.push(&self.dir.group.id); base_path.push(&self.dir.group.id);
base_path.push(&self.backup_time_string); base_path.push(&self.backup_time_string);