From 1a53c7c3ccebc7c2b8b13d6974aaad9b93b36d55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Norman=20J=C3=A4ckel?= Date: Wed, 15 Feb 2017 17:07:59 +0100 Subject: [PATCH] Fixed write settings command for Windows portable version. Fixed #2947. --- openslides/utils/main.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/openslides/utils/main.py b/openslides/utils/main.py index d47f68a40..6b9f7bca7 100644 --- a/openslides/utils/main.py +++ b/openslides/utils/main.py @@ -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)