torrc uses / on windows

This commit is contained in:
j 2019-01-18 17:15:11 +05:30
parent 2d9f5446dc
commit 37a45bdad9

View file

@ -47,6 +47,8 @@ ControlPort 9831
CookieAuthentication 1 CookieAuthentication 1
'''.strip()) '''.strip())
tor_data = os.path.join(settings.data_path, 'TorData') tor_data = os.path.join(settings.data_path, 'TorData')
if sys.platform == 'win32':
tor_data = os.path.normpath(tor_data).replace(os.SEP, '/')
if not os.path.exists(torrc): if not os.path.exists(torrc):
with open(torrc, 'w') as fd: with open(torrc, 'w') as fd:
fd.write(''' fd.write('''