Skip to content

Commit

Permalink
support logo file in pkg root dir (#164)
Browse files Browse the repository at this point in the history
  • Loading branch information
wklken authored Dec 25, 2019
1 parent 5cf6cf5 commit c99deac
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion paas-ce/paas/paas/saas/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit c99deac

Please sign in to comment.