Merge #15583: wallet: Log and ignore errors in ListWalletDir and IsBe…

Merge #15583: wallet: Log and ignore errors in ListWalletDir and IsBerkeleyBtree

15c69b158da570f4e1430280c610e94ffdee0e51 wallet: Log and ignore errors in ListWalletDir and IsBerkeleyBtree (João Barbosa)

Pull request description:

  Use the `noexcept` members of `boost::filesystem::recursive_directory_iterator` in order to ignore `boost::filesystem::directory_iterator::construct: Permission denied` errors. The errors are logged though.

  Steps to reproduce the issue:

  ```sh
  # 1. create directory for -walletdir without read access:
  mkdir /tmp/foo && chmod a-r /tmp/foo

  # 2. run bitcoin-qt and should print an error, but continues running:
  /Volumes/Bitcoin-Core/Bitcoin-Qt.app/Contents/MacOS/Bitcoin-Qt -regtest -walletdir=/tmp/foo
  /private/tmp/foo: Permission denied

  # 4. go to File -> Open Wallet and should segfault:
  EXCEPTION: N5boost10filesystem16filesystem_errorE
  boost::filesystem::directory_iterator::construct: Permission denied: "/private/tmp/foo"
  bitcoin in Runaway exception
  ```

Tree-SHA512: 37e8bf5a1e0defc331030fd511bf9cac2765d01dfbf23e7233f37506e85b8ad07edcde9ba6dae7a2c95700c78d28c7dd248153607381852da96273cb159c4934

情報元 - Merge #15583: wallet: Log and ignore errors in ListWalletDir and IsBe… · bitcoin/[email protected] · GitHub

Merge #15583: wallet: Log and ignore errors in ListWalletDir and IsBe… · bitcoin/bitcoin@7fa1f62 · GitHub
スポンサーリンク

シェアする

フォローする

スポンサーリンク

トップへ戻る