From f96c9f7f89791c86c9ec9f037d95f176636aa269 Mon Sep 17 00:00:00 2001 From: Terry Geng Date: Thu, 31 Dec 2020 11:01:22 +0800 Subject: [PATCH] fix: lang/ path not found --- util.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/util.py b/util.py index 8fe9edf..69c7366 100644 --- a/util.py +++ b/util.py @@ -432,7 +432,8 @@ def verify_password(password, salted_hash, salt): def get_supported_language(): - lang_files = os.listdir('lang') + root_dir = os.path.dirname(__file__) + lang_files = os.listdir(os.path.join(root_dir, 'lang')) lang_list = [] for lang_file in lang_files: match = re.search("([a-z]{2}_[A-Z]{2})\.json", lang_file)