diff --git a/umu/umu_runtime.py b/umu/umu_runtime.py index 4bf93712b..cdcda98f6 100644 --- a/umu/umu_runtime.py +++ b/umu/umu_runtime.py @@ -271,8 +271,8 @@ def _update_umu( log.debug("Acquired file lock '%s'", lock.lock_file) for file in local.glob("*"): if file.is_dir(): - if file.is_file() and file != lock.lock_file: rmtree(str(file)) + if file.is_file() and not file.name.endswith(".lock"): file.unlink() _restore_umu( json, @@ -301,8 +301,8 @@ def _update_umu( log.debug("Acquired file lock '%s'", lock.lock_file) for file in local.glob("*"): if file.is_dir(): - if file.is_file() and file != lock.lock_file: rmtree(str(file)) + if file.is_file() and not file.name.endswith(".lock"): file.unlink() _restore_umu( json,