Use AppData\Local instead of AppData\Roaming #2391

issue gusarov openend this issue on March 20, 2013
  1. gusarov commented at 7:29 am on March 20, 2013: none
    In Windows OS, please, use AppData\Local (%LocalAppData% in Win7) instead of AppData\Roaming (%AppData%) The roaming folder is intended for synchronization with roaming profile storage, this is why all software should keep only small and absolutely necessary files here, which can make sense in other machine for the same user. Take look at browsers - they stores cache history in local folder and browser settings in roaming, this is correct. An average size of roaming profile for typical user is about 100..150MB (which can be easily transferred via LAN to any user’s PC), but Bitcoin’s folder have 16GB wich is inappropriate. At the same time you can think about ability to manually specify storage location, because of such a huge size. Most modern PC have SSD with quite limited capacity (64, 80, 128) for system drive and separate HDD of several TB in size. Personally I have to create Symbolic Link to store Bitcoin’s storage on alternative drive.
  2. Diapolo commented at 12:07 pm on March 20, 2013: none
    You are free to move your data directory via the -datadir= switch the client accepts. But still you have a valid point, we most likely don’t want the datadir to be in roaming as in can grow rather large and for server-based profiles that would cause it to be synced everytime you logon/logoff.
  3. laanwj commented at 5:44 pm on January 10, 2014: member

    On the other hand for the wallet and configuration it makes sense for it to be roaming, to make sure that they are properly backed up (!). So it makes sense to split this up as soon as we support a different blockchain and wallet/configuration path (see #3214).

    BTW we use SHGetSpecialFolderPathA with CSIDL_APPDATA to get a directory for the data directory. Is there anything special that has to be done to get a local path?

  4. gusarov commented at 5:06 am on January 14, 2014: none

    On Fri, Jan 10, 2014 at 9:47 PM, Wladimir J. van der Laan < notifications@github.com> wrote:

    CSIDL_APPDATA

    you can use CSIDL_LOCAL_APPDATA

  5. laanwj added the label Block storage on Feb 16, 2016
  6. laanwj removed the label Priority Low on Dec 6, 2017
  7. maflcko commented at 5:45 pm on May 8, 2020: member
    There is -blocksdir now for finer-grained control
  8. maflcko closed this on May 8, 2020

  9. gusarov commented at 5:09 pm on May 10, 2020: none
    Essentially issue is not resolved. I do understand that I can easily solve this for myself, but I raised this issue to help new users with default configuration and to help improve current architecture. For me this is clearly architectural flaw. I do understand that you can not just change default lookup path, because somebody already have the storage in another dir, but there are many ways to solve it, e.g. a flag in new path marking that it been initialized here our old path must be considered first.
  10. maflcko commented at 5:13 pm on May 10, 2020: member
    Are you saying that -blocksdir should be exposed as an option in the gui intro dialog?
  11. gusarov commented at 1:38 am on August 25, 2020: none

    No, this is not about exposing options, the option is exposed. image

    This is about default data directory. It is incorrect to use Roaming directory for large files, the default directory on Windows should be under %LocalAppData%. Regular users don’t know this and should not know this, no reason to rely on their mindful configuration, this is just a guidelines how software should behave on Windows.

  12. maflcko commented at 6:28 am on August 25, 2020: member

    Ah, so for fresh installations it could make sense to split the blocksdir and the datadir between Local and Roaming. For existing installations this can not be changed.

    The new settings.json might come in handy when implementing this.

  13. maflcko reopened this on Aug 25, 2020

  14. maflcko added the label Windows on Aug 25, 2020
  15. ryanofsky commented at 1:40 pm on August 25, 2020: contributor

    I kind of think the whole bitcoin datadir should go in %LocalAppData% by default, not %AppData%. It’s true that large block and index files don’t make sense in %AppData%. But I’d think that smaller sensitive files like wallets and cookies also should not be mirrored and roam across the network. Also I could see use of %AppData% instead of %LocalAppData% breaking locks and possibly leading to corruption.

    Maybe the thing to do is to change GetDefaultDataDir to continue returning %AppData%\Bitcoin if already exists for backwards compatibility, but otherwise return %LocalAppData%\Bitcoin.

  16. achow101 closed this on May 23, 2024

  17. achow101 referenced this in commit 915d7276e4 on May 23, 2024

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: 2024-09-29 01:12 UTC

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