Bitcoin Forum
April 26, 2024, 11:00:37 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Bug: Incorrect datadir location on Windows  (Read 2621 times)
theymos (OP)
Administrator
Legendary
*
Offline Offline

Activity: 5180
Merit: 12899


View Profile
February 17, 2013, 04:42:33 AM
 #1

On Windows, Electrum puts its data directory in %LOCALAPPDATA%. This is incorrect. %LOCALAPPDATA% is for non-critical files such as temporary files. This directory is usually not backed up by backup software, and it is sometimes scheduled to be reset regularly. Clearly not a good place for wallet files.

The correct location is %APPDATA%.

1NXYoJ5xU91Jp83XfVMHwwTUyZFK64BoAD
No Gods or Kings. Only Bitcoin
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714129237
Hero Member
*
Offline Offline

Posts: 1714129237

View Profile Personal Message (Offline)

Ignore
1714129237
Reply with quote  #2

1714129237
Report to moderator
1714129237
Hero Member
*
Offline Offline

Posts: 1714129237

View Profile Personal Message (Offline)

Ignore
1714129237
Reply with quote  #2

1714129237
Report to moderator
Tachikoma
Hero Member
*****
Offline Offline

Activity: 938
Merit: 1000



View Profile WWW
February 17, 2013, 04:08:00 PM
 #2

I could change this but I guess we need some intelligent code that will check if there are wallets in %LOCALAPPDATA% and move them to %APPDATA%.

Do you have a source about this? (APPDATA vs LOCALAPPDATA)

Electrum: the convenience of a web wallet, without the risks | Bytesized Seedboxes BTC/LTC supported
theymos (OP)
Administrator
Legendary
*
Offline Offline

Activity: 5180
Merit: 12899


View Profile
February 17, 2013, 04:25:54 PM
 #3

I could change this but I guess we need some intelligent code that will check if there are wallets in %LOCALAPPDATA% and move them to %APPDATA%.

Yeah, that's why I didn't just fix it myself and submit a pull request.

Do you have a source about this? (APPDATA vs LOCALAPPDATA)

Windows uses the Local and LocalLow folders for application data that does not roam with the user. Usually this data is either machine specific or too large to roam. The AppData\Local folder in Windows Vista is the same as the Documents and Settings\username\Local Settings\Application Data folder in Windows XP.

Windows uses the Roaming folder for application specific data, such as custom dictionaries, which are machine independent and should roam with the user profile. The AppData\Roaming folder in Windows Vista is the same as the Documents and Settings\username\Application Data folder in Windows XP.

Basically this means that Local/LocalLow stuff, since it doesn't "roam with the user", isn't very important and doesn't need to be saved.

1NXYoJ5xU91Jp83XfVMHwwTUyZFK64BoAD
Tachikoma
Hero Member
*****
Offline Offline

Activity: 938
Merit: 1000



View Profile WWW
February 18, 2013, 10:34:26 PM
 #4

I've just pushed this commit to the repository.

I setup a rudimentary Windows VM to test it and I think it works, but I don't normally work on the windows bits. I would appreciate a code review if you are able and if you have a local Python development environment I would appreciate it if you could check it out. If not there should be a nightly build tonight with the commit in it here.

Electrum: the convenience of a web wallet, without the risks | Bytesized Seedboxes BTC/LTC supported
theymos (OP)
Administrator
Legendary
*
Offline Offline

Activity: 5180
Merit: 12899


View Profile
February 19, 2013, 12:47:26 AM
 #5

It works for me, though I get this warning:

C:\Users\Michael\Desktop\electrum-master\lib\util.py:72: SyntaxWarning: import * only allowed at module level

Thanks.

1NXYoJ5xU91Jp83XfVMHwwTUyZFK64BoAD
Tachikoma
Hero Member
*****
Offline Offline

Activity: 938
Merit: 1000



View Profile WWW
February 19, 2013, 09:47:36 AM
 #6

Yeah I noticed that myself after I got some sleep, will have to ask Thomas on how to best handle this one. Will fix that in master as soon as I can.

Electrum: the convenience of a web wallet, without the risks | Bytesized Seedboxes BTC/LTC supported
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!