Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: split slot mount helper as a standalone module, refactor to make the mount/umount more robust #417

Merged
merged 12 commits into from
Nov 11, 2024
Merged
Prev Previous commit
Next Next commit
ensure_mointpoint: is_dir also return true on symlink
  • Loading branch information
Bodong-Yang committed Nov 11, 2024
commit 269d06b497adcaa9fae046fc7b93d30b0ec5632c
2 changes: 1 addition & 1 deletion src/otaclient/boot_control/_slot_mnt_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def ensure_mointpoint(mnt_point: Path) -> None: # pragma: no cover
If the <mnt_point> is valid, but we failed to umount any previous mounts on it,
we still keep use the mountpoint as later mount will override the previous one.
"""
if not mnt_point.is_dir():
if mnt_point.is_symlink() or not mnt_point.is_dir():
mnt_point.unlink(missing_ok=True)

if not mnt_point.exists():
Expand Down