1
0
mirror of https://github.com/altlinux/gpupdate.git synced 2025-03-21 18:50:38 +03:00

Merge pull request #109 from altlinux/update-desktop-database

Shortcuts applier improvement
This commit is contained in:
Evgeny Sinelnikov 2020-08-26 17:57:30 +04:00 committed by GitHub
commit ccfba4b592
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -99,13 +99,14 @@ class shortcut_applier(applier_frontend):
if shortcuts:
for sc in shortcuts:
write_shortcut(sc)
if len(shortcuts) > 0:
# According to ArchWiki - this thing is needed to rebuild MIME
# type cache in order file bindings to work. This rebuilds
# databases located in /usr/share/applications and
# /usr/local/share/applications
subprocess.check_call(['/usr/bin/update-desktop-database'])
else:
logging.debug(slogm('No shortcuts to process for {}'.format(self.storage.get_info('machine_sid'))))
# According to ArchWiki - this thing is needed to rebuild MIME
# type cache in order file bindings to work. This rebuilds
# databases located in /usr/share/applications and
# /usr/local/share/applications
subprocess.check_call(['/usr/bin/update-desktop-database'])
def apply(self):
if self.__module_enabled: