Create mount_point before mounting source
This commit is contained in:
parent
b71d3479be
commit
ea3240772e
1 changed files with 2 additions and 0 deletions
|
|
@ -75,6 +75,8 @@ def mount(source, mount_point=None, read_write=False):
|
||||||
if not running_as_root():
|
if not running_as_root():
|
||||||
cmd.insert(0, 'udevil')
|
cmd.insert(0, 'udevil')
|
||||||
if mount_point:
|
if mount_point:
|
||||||
|
mount_point = pathlib.Path(mount_point).resolve()
|
||||||
|
mount_point.mkdir(parents=True, exist_ok=True)
|
||||||
cmd.append(mount_point)
|
cmd.append(mount_point)
|
||||||
|
|
||||||
# Run mount command
|
# Run mount command
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue