RecentApp: Fix crash when location doesn't exist

This commit is contained in:
Clement Lefebvre 2019-09-26 09:42:01 +01:00
parent c6aef1bb28
commit f1c321d255

View File

@ -66,13 +66,14 @@ def recentAppBuildLauncher(location):
if location.startswith("file://"):
location = location[7:]
if os.path.exists(location):
appButton = ApplicationLauncher(location, iconSize)
if appButton.appExec:
appButton.show()
appButton.connect("clicked", applicationButtonClicked)
appButton.type = "location"
return appButton
print("RecentApp: %s not found." % location)
except Exception as e:
print("File in recentapp not found: '%s': %s" % (location, e))