From fa9be31e5c9f246c47954d7dfaa34225923e9199 Mon Sep 17 00:00:00 2001 From: zawz Date: Mon, 21 Mar 2022 16:02:15 +0100 Subject: [PATCH] fix: broken webdav lsf --- src/webdav.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/webdav.sh b/src/webdav.sh index ae050cf..aa4e963 100644 --- a/src/webdav.sh +++ b/src/webdav.sh @@ -12,7 +12,7 @@ webdav_cmd() { } webdav_list() { - webdav_cmd "$datapath/" -X PROPFIND --upload-file - -H "Depth: 1" << EOF | grep '' | cut -d'>' -f2 | cut -d'<' -f1 | sed "s|^/$datapath/||g" + webdav_cmd "${datapath%/}/" -X PROPFIND --upload-file - -H "Depth: 1" << EOF | xmllint --xpath "//*[local-name()='href']" - | sed "s/<[/a-zA-Z]*:href>//g;s|^/$datapath/||g;/^$/d"