[pbs-devel] [PATCH proxmox-backup 05/22] api2/admin/datastore: accept "/" as path for root
Stefan Reiter
s.reiter at proxmox.com
Tue Feb 16 18:06:53 CET 2021
From: Dominik Csapak <d.csapak at proxmox.com>
makes more sense than sending "root'"
Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
Signed-off-by: Stefan Reiter <s.reiter at proxmox.com>
---
src/api2/admin/datastore.rs | 2 +-
www/window/FileBrowser.js | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/api2/admin/datastore.rs b/src/api2/admin/datastore.rs
index ab88d172..88f011e4 100644
--- a/src/api2/admin/datastore.rs
+++ b/src/api2/admin/datastore.rs
@@ -1328,7 +1328,7 @@ pub fn catalog(
let mut catalog_reader = CatalogReader::new(reader);
- let path = if filepath != "root" {
+ let path = if filepath != "root" && filepath != "/" {
base64::decode(filepath)?
} else {
vec![b'/']
diff --git a/www/window/FileBrowser.js b/www/window/FileBrowser.js
index 01b5d79b..724e1791 100644
--- a/www/window/FileBrowser.js
+++ b/www/window/FileBrowser.js
@@ -185,6 +185,7 @@ Ext.define("PBS.window.FileBrowser", {
store: {
autoLoad: false,
model: 'pbs-file-tree',
+ defaultRootId: '/',
nodeParam: 'filepath',
sorters: 'text',
proxy: {
--
2.20.1
More information about the pbs-devel
mailing list