Merge pull request #2968 from normanjaeckel/StaticDir

Fixed write settings command for Windows portable version. Fixed #2947.
This commit is contained in:
Emanuel Schütze 2017-02-15 22:57:05 +01:00 committed by GitHub
commit 0da7765dc0

View File

@ -253,7 +253,10 @@ def write_settings(settings_path=None, template=None, **context):
os.makedirs(settings_module)
with open(settings_path, 'w') as settings_file:
settings_file.write(content)
openslides_user_data_path = context['openslides_user_data_path'].strip("'")
if context['openslides_user_data_path'] == 'get_win32_portable_user_data_path()':
openslides_user_data_path = get_win32_portable_user_data_path()
else:
openslides_user_data_path = context['openslides_user_data_path'].strip("'")
os.makedirs(os.path.join(openslides_user_data_path, 'static'), exist_ok=True)
return os.path.realpath(settings_path)