Cannot -rescan or -reindex directory junction [Windows 7] #6151

issue ghost opened this issue on May 16, 2015
  1. ghost commented at 8:35 PM on May 16, 2015: none

    I accidentally launched bitcoin-qt after moving my Bitcoin/blocks directory just before creating directory junction. This wrote over my database folder.

    Then I made the link:

    C:\>mklink /J "%APPDATA%\Bitcoin\blocks" "E:\Bitcoin\blocks"
    Junction created for [...]
    

    Bitcoin-qt immediately exits with same N5boost10filesystem16filesystem_errorE exception.

    Rescanning fails:

    C:\Program Files\Bitcoin\daemon>bitcoind -rescan
    
    ************************
    EXCEPTION: N5boost10filesystem16filesystem_errorE
    boost::filesystem::create_directory: Cannot create a file when that file already
     exists: "C:\Users\Admin\AppData\Roaming\Bitcoin\blocks"
    C:\Program Files\Bitcoin\daemon\bitcoind.exe in AppInit()
    

    Reindexing fails with error "Error opening block database"

  2. laanwj commented at 7:58 AM on May 18, 2015: member

    Instead of creating a junction, pass a -datadir= argument to bitcoind (or put it in bitcoin.conf) to tell it of the new location.

  3. laanwj closed this on May 18, 2015

  4. DrahtBot locked this on Sep 8, 2021
Contributors

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-17 15:15 UTC

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