Create mount_point before mounting source

This commit is contained in:
2Shirt 2020-01-22 23:15:12 -07:00
parent b71d3479be
commit ea3240772e
Signed by: 2Shirt
GPG key ID: 152FAC923B0E132C

View file

@ -75,6 +75,8 @@ def mount(source, mount_point=None, read_write=False):
if not running_as_root():
cmd.insert(0, 'udevil')
if mount_point:
mount_point = pathlib.Path(mount_point).resolve()
mount_point.mkdir(parents=True, exist_ok=True)
cmd.append(mount_point)
# Run mount command