tool_cb_wrt: fix no-clobber error handling

When saving a file with --no-clobber, make sure the existing file name
remains set when creating the name fails. In a retry scenario, it comes
back and uses that variable again.

Add test 3036 to verify.

Reported-by: James Fuller
Closes #20939
This commit is contained in:
Daniel Stenberg 2026-03-16 14:51:52 +01:00
parent 3525ed9b2f
commit 29cb750fc2
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
3 changed files with 69 additions and 3 deletions

View file

@ -277,7 +277,7 @@ test3000 test3001 test3002 test3003 test3004 test3005 test3006 test3007 \
test3008 test3009 test3010 test3011 test3012 test3013 test3014 test3015 \
test3016 test3017 test3018 test3019 test3020 test3021 test3022 test3023 \
test3024 test3025 test3026 test3027 test3028 test3029 test3030 test3031 \
test3032 test3033 test3034 test3035 \
test3032 test3033 test3034 test3035 test3036 \
\
test3100 test3101 test3102 test3103 test3104 test3105 \
\