From c99deace61b7f8920cccc1cf9b0e045ce14a7f60 Mon Sep 17 00:00:00 2001 From: wklken Date: Wed, 25 Dec 2019 14:27:18 +0800 Subject: [PATCH] support logo file in pkg root dir (#164) --- paas-ce/paas/paas/saas/utils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/paas-ce/paas/paas/saas/utils.py b/paas-ce/paas/paas/saas/utils.py index 01b9d0add..2733cc220 100644 --- a/paas-ce/paas/paas/saas/utils.py +++ b/paas-ce/paas/paas/saas/utils.py @@ -94,7 +94,8 @@ def extract_logo_file(filename, path, saas_app_code): def match_func(name): if not isinstance(name, unicode): name = name.decode("utf-8") - return name.endswith(app_logo_name) and len(name.split("/")) == 3 + # support logo file in x/{app_code}.png or x/src/{app_code}.png + return name.endswith(app_logo_name) and (len(name.split("/")) in (2, 3)) ok, message, content = _get_file_from_tar_file(filename, path, match_func) if not ok: