1
0
mirror of https://github.com/altlinux/gpupdate.git synced 2025-01-08 05:17:54 +03:00

Fixed setting links in shortcuts

This commit is contained in:
Valery Sinelnikov 2024-08-27 11:34:45 +04:00
parent 674e1d176b
commit 5f178651f7

View File

@ -46,7 +46,7 @@ def get_ttype(targetstr):
'''
ttype = TargetType.FILESYSTEM
if targetstr == 'URL':
if targetstr == 'URL'or targetstr == TargetType.URL:
ttype = TargetType.URL
return ttype
@ -221,7 +221,7 @@ class shortcut(DynamicAttributes):
'''
Update desktop file object from internal data.
'''
if self.type == TargetType.URL:
if get_ttype(self.type) == TargetType.URL:
self.desktop_file.set('Type', 'Link')
else:
self.desktop_file.set('Type', 'Application')
@ -231,7 +231,7 @@ class shortcut(DynamicAttributes):
desktop_path = self.path
if self.expanded_path:
desktop_path = self.expanded_path
if self.type == TargetType.URL:
if get_ttype(self.type) == TargetType.URL:
self.desktop_file.set('URL', desktop_path)
else:
str2bool_lambda = (lambda boolstr: boolstr if isinstance(boolstr, bool)