Wrap create_directory calls in try...catch blocks. #3946

pull brandondahler wants to merge 1 commits into bitcoin:master from brandondahler:create_directory_try changing 5 files +22 −4
  1. brandondahler commented at 3:01 AM on March 24, 2014: contributor

    Ignores any exceptions thrown if directory exists, otherwise re-throws exception.

    Implements #432.

  2. in src/db.cpp:None in cb095e298a outdated
      71 | @@ -72,7 +72,15 @@ bool CDBEnv::Open(const boost::filesystem::path& pathIn)
      72 |  
      73 |      path = pathIn;
      74 |      filesystem::path pathLogDir = path / "database";
      75 | -    filesystem::create_directory(pathLogDir);
      76 | +
      77 | +    try
    


    laanwj commented at 7:06 AM on March 24, 2014:

    You're repeating the same thing four times. Please factor this out to a function.

  3. laanwj commented at 7:38 AM on March 25, 2014: member

    ACK (pull tester is a false positive due to being unable to build the tests after d138598, should be fixed now)

  4. Wrap create_directory calls in try...catch blocks.
    Ignores any exceptions thrown if directory exists, otherwise re-throws exception.
    2c81188023
  5. brandondahler commented at 11:25 PM on March 25, 2014: contributor

    Rebased for clean pull tester.

  6. BitcoinPullTester commented at 11:39 PM on March 25, 2014: none

    Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/2c811880239ec6d5cdf6870c1f648f02ef908e37 for binaries and test log. This test script verifies pulls every time they are updated. It, however, dies sometimes and fails to test properly. If you are waiting on a test, please check timestamps to verify that the test.log is moving at http://jenkins.bluematt.me/pull-tester/current/ Contact BlueMatt on freenode if something looks broken.

  7. laanwj commented at 7:52 AM on March 31, 2014: member

    Rebased and merged via 2b7709dc84ed37128c125ca7a97b2e4b2c4437e7

  8. laanwj closed this on Mar 31, 2014

  9. DrahtBot locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-13 21:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me