Problem: help backupwallet lists a directory as a valid destination. Passing an existing directory returns RPC error -4.
Fix: Clarify in the RPC description and the help for destination that the path must include a filename.
<details><summary>Reproducer</summary>
cmake -B build && cmake --build build --target bitcoind bitcoin-cli
args=(-regtest -datadir="$(mktemp -d)" -rpcport=19456)
(cd build/bin && ./bitcoind "${args[@]}" -listen=0 -daemonwait && ./bitcoin-cli "${args[@]}" createwallet demo && ./bitcoin-cli "${args[@]}" backupwallet "$PWD"; killall bitcoind)
Expected output from backupwallet:
error code: -4
error message:
Error: Wallet backup failed!
</details>