Merge bitcoin/bitcoin#36972: doc: clarify that `backupwallet` requires a filename
What changed, and why it matters
This commit only changes the user-facing help text for the backupwallet command. It makes the documentation clearer that you must provide a filename, not just a directory. No code behavior changed, and there is no security issue here.
No action needed; this is a documentation-only clarification.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The patch updates two strings in src/wallet/rpc/backup.cpp: the RPC method description and the help text for the destination argument. The actual backupwallet implementation is untouched. The change is purely documentation to reflect that passing a directory already fails with RPC error -4. There is no bug fix, behavior change, or security-relevant code modification.
Changed components
src/wallet/rpc/backup.cpp documentation stringsInspect captured patch +2 / −2
### src/wallet/rpc/backup.cpp
@@ -358,9 +358,9 @@ RPCMethod backupwallet()
{
return RPCMethod{
"backupwallet",
- "Safely copies the current wallet file to the specified destination, which can either be a directory or a path with a filename.\n",
+ "Backs up the current wallet to the specified file.\n",
{
- {"destination", RPCArg::Type::STR, RPCArg::Optional::NO, "The destination directory or file"},
+ {"destination", RPCArg::Type::STR, RPCArg::Optional::NO, "Path to the backup file, including its filename"},
},
RPCResult{RPCResult::Type::NONE, "", ""},
RPCExamples{Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.