RecentApp: Fix crash when location doesn't exist
This commit is contained in:
parent
c6aef1bb28
commit
f1c321d255
@ -66,13 +66,14 @@ def recentAppBuildLauncher(location):
|
|||||||
|
|
||||||
if location.startswith("file://"):
|
if location.startswith("file://"):
|
||||||
location = location[7:]
|
location = location[7:]
|
||||||
appButton = ApplicationLauncher(location, iconSize)
|
if os.path.exists(location):
|
||||||
|
appButton = ApplicationLauncher(location, iconSize)
|
||||||
if appButton.appExec:
|
if appButton.appExec:
|
||||||
appButton.show()
|
appButton.show()
|
||||||
appButton.connect("clicked", applicationButtonClicked)
|
appButton.connect("clicked", applicationButtonClicked)
|
||||||
appButton.type = "location"
|
appButton.type = "location"
|
||||||
return appButton
|
return appButton
|
||||||
|
print("RecentApp: %s not found." % location)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print("File in recentapp not found: '%s': %s" % (location, e))
|
print("File in recentapp not found: '%s': %s" % (location, e))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user