Don't perform write tests on every getBaseFolder call

Especially not when rendering the main UI - we don't want to trigger
a 500 then, even if some folders are misconfigured.
This commit is contained in:
Gina Häußge committed 2018-07-18 15:41:26 +02:00
1 parent 903dd36d68
commit fe13348fd3
6 files changed
+19 -18

No files matched your search

+1 -1
View File
@@ -32,7 +32,7 @@ from flask_babel import Locale
@restricted_access
@admin_permission.require(403)
def getInstalledLanguagePacks():
translation_folder = settings().getBaseFolder("translations")
translation_folder = settings().getBaseFolder("translations", check_writable=False)
if not os.path.exists(translation_folder):
return jsonify(language_packs=dict(_core=[]))