Skip to content

Commit ef3979e

Browse files
authored
Fix capitalization of WebApp (#300)
1 parent e1d2afc commit ef3979e

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

usr/lib/webapp-manager/common.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,9 +156,9 @@ def __init__(self):
156156
def get_webapps(self):
157157
webapps = []
158158
for filename in os.listdir(APPS_DIR):
159-
if filename.startswith("webapp-") and filename.endswith(".desktop"):
159+
if filename.lower().startswith("webapp-") and filename.endswith(".desktop"):
160160
path = os.path.join(APPS_DIR, filename)
161-
codename = filename.replace("webapp-", "").replace(".desktop", "")
161+
codename = filename.replace("webapp-", "").replace("WebApp-", "").replace(".desktop", "")
162162
if not os.path.isdir(path):
163163
try:
164164
webapp = WebAppLauncher(path, codename)
@@ -248,7 +248,7 @@ def create_webapp(self, name, url, icon, category, browser, custom_parameters, i
248248
# Generate a 4 digit random code (to prevent name collisions, so we can define multiple launchers with the same name)
249249
random_code = ''.join(choice(string.digits) for _ in range(4))
250250
codename = "".join(filter(str.isalpha, name)) + random_code
251-
path = os.path.join(APPS_DIR, "webapp-%s.desktop" % codename)
251+
path = os.path.join(APPS_DIR, "WebApp-%s.desktop" % codename)
252252

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

0 commit comments

Comments
 (0)