Skip to content

Commit

Permalink
Fix capitalization of WebApp (#300)
Browse files Browse the repository at this point in the history
  • Loading branch information
KyleGospo authored May 22, 2024
1 parent e1d2afc commit ef3979e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions usr/lib/webapp-manager/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,9 @@ def __init__(self):
def get_webapps(self):
webapps = []
for filename in os.listdir(APPS_DIR):
if filename.startswith("webapp-") and filename.endswith(".desktop"):
if filename.lower().startswith("webapp-") and filename.endswith(".desktop"):
path = os.path.join(APPS_DIR, filename)
codename = filename.replace("webapp-", "").replace(".desktop", "")
codename = filename.replace("webapp-", "").replace("WebApp-", "").replace(".desktop", "")
if not os.path.isdir(path):
try:
webapp = WebAppLauncher(path, codename)
Expand Down Expand Up @@ -248,7 +248,7 @@ def create_webapp(self, name, url, icon, category, browser, custom_parameters, i
# Generate a 4 digit random code (to prevent name collisions, so we can define multiple launchers with the same name)
random_code = ''.join(choice(string.digits) for _ in range(4))
codename = "".join(filter(str.isalpha, name)) + random_code
path = os.path.join(APPS_DIR, "webapp-%s.desktop" % codename)
path = os.path.join(APPS_DIR, "WebApp-%s.desktop" % codename)

with open(path, 'w') as desktop_file:
desktop_file.write("[Desktop Entry]\n")
Expand Down

0 comments on commit ef3979e

Please sign in to comment.