Bitcoin-Qt using wrong data directory #2605

issue gavinandresen opened this issue on May 2, 2013
  1. gavinandresen commented at 3:52 PM on May 2, 2013: contributor

    Steps to reproduce:

    1. Create an empty data directory with a testnet bitcoin.conf; e.g. mkdir /tmp/d echo "testnet=1" >> /tmp/d/bitcoin.conf echo "rpcuser=abc" >> /tmp/d/bitcoin.conf echo "rpcpassword=def" >> /tmp/d/bitcoin.conf
    2. Run Bitcoin-Qt with -datadir=/tmp/d

    You get a nice green splashscreen, BUT a wallet.dat and blockchain files directly in /tmp/d, not in /tmp/d/testnet3/

    bitcoind behaves correctly.

  2. ghost assigned laanwj on May 2, 2013
  3. jonasschnelli commented at 4:40 PM on May 2, 2013: contributor

    Just had a look at it. The problem might be the "cachedPath". Before loading the configfile, the original path will be cached and not rewritten by the value defined in the config file. So it will somehow need a "clear path cache" after loading the config.

    I try to implement something...

    But why this bug is not affecting bitcoind? The bug seams to be in util.cpp?

  4. jonasschnelli referenced this in commit b357a71cfa on May 2, 2013
  5. Diapolo commented at 8:55 PM on May 2, 2013: none

    Couldn't that be considered a wanted behaviour if you explicitly specify a -datadir when using testnet? Forget it, seems more reasonable to fix this ;).

  6. gavinandresen commented at 9:42 PM on May 2, 2013: contributor

    @Diapolo : no

  7. gmaxwell commented at 9:44 PM on May 2, 2013: contributor

    @Diapolo In the case of it being "wanted" the correct behavior is at least harmless, in the case where it's not wanted the incorrect (current) behavior is dangerous. So even admitting that sometimes people might want it, the less risky behavior is the one we want.

  8. sipa referenced this in commit 3a100b6776 on May 2, 2013
  9. sipa closed this on May 3, 2013

  10. sipa referenced this in commit b45fd0a5a4 on May 3, 2013
  11. kyledrake referenced this in commit 8e0256b8a6 on Jul 25, 2013
  12. luke-jr referenced this in commit 4ec55068dc on Aug 16, 2013
  13. laudney referenced this in commit 25222a74a5 on Mar 19, 2014
  14. laudney referenced this in commit f3d5e60b3b on Mar 19, 2014
  15. MarcoFalke 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-19 12:16 UTC

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