mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-04-09 03:44:23 +00:00
change default node-directory on windows to do registry lookup, not ~/.tahoe
This commit is contained in:
parent
fbf6c48ed8
commit
0b097ac485
@ -27,7 +27,11 @@ class VDriveOptions(BaseOptions, usage.Options):
|
||||
def postOptions(self):
|
||||
# compute a node-url from the existing options, put in self['node-url']
|
||||
if self['node-directory']:
|
||||
self['node-directory'] = os.path.expanduser(self['node-directory'])
|
||||
if sys.platform == 'win32' and self['node-directory'] == '~/.tahoe':
|
||||
from allmydata.windows import registry
|
||||
self['node-directory'] = registry.get_base_dir_path()
|
||||
else:
|
||||
self['node-directory'] = os.path.expanduser(self['node-directory'])
|
||||
if self['node-url']:
|
||||
if (not isinstance(self['node-url'], basestring)
|
||||
or not NODEURL_RE.match(self['node-url'])):
|
||||
|
@ -36,7 +36,11 @@ class BasedirMixin:
|
||||
self.basedirs.extend(args)
|
||||
else:
|
||||
if len(args) == 0 and not self.basedirs:
|
||||
self.basedirs.append(os.path.expanduser("~/.tahoe"))
|
||||
if sys.platform == 'win32':
|
||||
from allmydata.windows import registry
|
||||
self.basedirs.append(registry.get_base_dir_path())
|
||||
else:
|
||||
self.basedirs.append(os.path.expanduser("~/.tahoe"))
|
||||
if len(args) > 0:
|
||||
self.basedirs.append(args[0])
|
||||
if len(args) > 1:
|
||||
|
Loading…
x
Reference in New Issue
Block a user