Commit 162ca259 authored by Philipp Hörist's avatar Philipp Hörist

Make open_file() work with Path objects

parent 85e0e0da
Pipeline #4796 passed with stages
in 3 minutes and 12 seconds
......@@ -1587,6 +1587,8 @@ def open_file(path):
if os.name == 'nt':
os.startfile(path)
else:
# Call str() to make it work with pathlib.Path
path = str(path)
if not path.startswith('file://'):
path = 'file://' + path
Gio.AppInfo.launch_default_for_uri(path)
......
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