From 26bb454ba4a227c371b622496db2b080a68ba120 Mon Sep 17 00:00:00 2001 From: Terranom674 Date: Thu, 20 Aug 2026 16:41:10 +0200 Subject: [PATCH] Preserve empty WebDAV root path in sync --- runtime/sync-webdav.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/runtime/sync-webdav.sh b/runtime/sync-webdav.sh index ab6a4ea..65334d7 100644 --- a/runtime/sync-webdav.sh +++ b/runtime/sync-webdav.sh @@ -72,8 +72,10 @@ failure() { trap 'failure $? "$BASH_COMMAND" "$LINENO"' ERR ROOT_ARGS=() -while IFS=$'\t' read -r path display_name; do - [[ -z "$path" || "$path" == \#* ]] && continue +while IFS= read -r line; do + [[ -z "$line" || "$line" == \#* ]] && continue + [[ "$line" == *$'\t'* ]] || continue + path="${line%%$'\t'*}" ROOT_ARGS+=(--root "$path") done < "$WEBDAV_ROOTS_FILE"