[pbs-devel] [PATCH proxmox-backup] api: directory: use relative path when creating removable datastore
Hannes Laimer
h.laimer at proxmox.com
Tue Nov 26 17:51:26 CET 2024
Reported-by: Markus Frank <m.frank at proxmox.com>
Fixes: 94a068e31 ("api: node: allow creation of removable datastore through directory endpoint")
Signed-off-by: Hannes Laimer <h.laimer at proxmox.com>
---
src/api2/node/disks/directory.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/api2/node/disks/directory.rs b/src/api2/node/disks/directory.rs
index 2f7cc7a27..6a76dd5a7 100644
--- a/src/api2/node/disks/directory.rs
+++ b/src/api2/node/disks/directory.rs
@@ -237,7 +237,7 @@ pub fn create_datastore_disk(
let lock = pbs_config::datastore::lock_config()?;
let datastore: DataStoreConfig = if removable_datastore {
serde_json::from_value(
- json!({ "name": name, "path": format!("/{name}"), "backing-device": uuid }),
+ json!({ "name": name, "path": name, "backing-device": uuid }),
)?
} else {
serde_json::from_value(json!({ "name": name, "path": mount_point }))?
--
2.39.5
More information about the pbs-devel
mailing list