From e4646683431c679398b1d9a7d6aa4a87768a7b5a Mon Sep 17 00:00:00 2001 From: Terranom674 Date: Wed, 19 Aug 2026 15:17:23 +0200 Subject: [PATCH] 0.9.6.17 allow Nextcloud root as WebDAV source --- include/nc_connector_wizard_webdav_flow.inc.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/include/nc_connector_wizard_webdav_flow.inc.php b/include/nc_connector_wizard_webdav_flow.inc.php index d8b7f6e..a6b1cf0 100644 --- a/include/nc_connector_wizard_webdav_flow.inc.php +++ b/include/nc_connector_wizard_webdav_flow.inc.php @@ -126,7 +126,6 @@ function bratonien_tools_nc_wizard_save_sources_dispatch() $selected = isset($state['directory_selected']) && is_array($state['directory_selected']) ? array_values(array_unique(array_map(function($path) { return trim((string)$path, '/'); }, $state['directory_selected']))) : array(); - $selected = array_values(array_filter($selected, function($path) { return $path !== ''; })); if (!$selected) { throw new RuntimeException('Bitte mindestens ein Nextcloud-Verzeichnis auswählen.'); @@ -143,9 +142,12 @@ function bratonien_tools_nc_wizard_save_sources_dispatch() { throw new RuntimeException('Für eine Auswahl fehlt die eindeutige Nextcloud-Datei-ID. Bitte das Verzeichnis erneut auswählen.'); } + $display_name = $path === '' + ? (trim((string)($state['display_name'] ?? '')) !== '' ? trim((string)$state['display_name']) : (string)$state['username']) + : basename($path); $roots[] = array( 'fileid'=>$fileid, - 'display_name'=>basename($path), + 'display_name'=>$display_name, 'webdav_path'=>$path, ); }