1
0

try home first

This commit is contained in:
ThomasV
2011-11-29 14:50:06 +01:00
parent 7d37f36783
commit 63cbda1bd3

View File

@@ -258,9 +258,12 @@ class Wallet:
wallet_dir = os.path.join( os.environ["APPDATA"], 'Electrum' ) wallet_dir = os.path.join( os.environ["APPDATA"], 'Electrum' )
else: else:
raise BaseException("No home directory found in environment variables.") raise BaseException("No home directory found in environment variables.")
self.path = os.path.join( wallet_dir, 'electrum.dat') self.path = os.path.join( wallet_dir, 'electrum.dat')
if not os.path.exists( self.path ): if not os.path.exists( self.path ):
if "HOME" in os.environ:
self.path = os.path.join( os.environ["HOME"], 'electrum.dat')
else:
self.path = os.path.join( os.getcwd(), 'electrum.dat' ) self.path = os.path.join( os.getcwd(), 'electrum.dat' )
print self.path print self.path