修复删除

This commit is contained in:
KAAAsS 2022-03-11 12:58:10 +08:00
parent 14e3e3061a
commit 76eb4c4fa6
Signed by: KAAAsS
GPG Key ID: D22F53AF662411FE

View File

@ -124,7 +124,7 @@ upload() {
get_file_list() {
flist_html=$(curl -sS --user "$user:$pass" -X PROPFIND "$server$server_path" -f --header 'Depth: 1' $curl_extra_args)
echo $flist_html | grep -Po '<D:href>.+?\/\K(.+?)(?=<\/D:href>)' -o | grep $prefix | sort
echo $flist_html | grep -Po '<D:href>.+?\/\K(.+?)(?=<\/D:href>)' -o | grep $server_path$prefix | sort
}
delete_file() {
@ -138,7 +138,7 @@ delete_file() {
echo -n "删除备份 $file: 第 $retry_count 次重试... "
fi
__try curl -sS --user "$user:$pass" -X DELETE "$server$server_path$file" -f $curl_extra_args
__try curl -sS --user "$user:$pass" -X DELETE "$server$file" -f $curl_extra_args
if __catch e; then
__color $RED '错误\n'