Add cleanup dead symlink
This commit is contained in:
parent
58ddc6d754
commit
ebf8761cb7
|
@ -346,6 +346,12 @@ def cleanup_numbered_dir(
|
||||||
for path in root.glob("garbage-*"):
|
for path in root.glob("garbage-*"):
|
||||||
try_cleanup(path, consider_lock_dead_if_created_before)
|
try_cleanup(path, consider_lock_dead_if_created_before)
|
||||||
|
|
||||||
|
# remove dead symlink
|
||||||
|
for left_dir in root.iterdir():
|
||||||
|
if left_dir.is_symlink():
|
||||||
|
if not left_dir.resolve().exists():
|
||||||
|
left_dir.unlink()
|
||||||
|
|
||||||
|
|
||||||
def make_numbered_dir_with_cleanup(
|
def make_numbered_dir_with_cleanup(
|
||||||
root: Path,
|
root: Path,
|
||||||
|
|
Loading…
Reference in New Issue