Fix logic error

parent bc76f951
......@@ -11,8 +11,8 @@ import re
def find_desktop(name):
if not re.search(r'\.desktop$', name):
name = '{}.desktop'.format(name)
if os.path.exists(name):
return name
if os.path.exists(name):
return name
output = subprocess.run(['find', '/usr/share', '-name', name], stdout=subprocess.PIPE).stdout.decode()
return output.split("\n")[0]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment