Ensure system dir exists for NOTFOUND

This commit is contained in:
ItsDrike 2023-02-02 21:12:45 +01:00
parent bf5734f571
commit 449e912560
No known key found for this signature in database
GPG key ID: B014E761034AF742

View file

@ -296,6 +296,7 @@ def apply_fix(diff: FileDiff) -> None:
if _choice is FixChoice.SKIP:
return
elif _choice is FixChoice.OVERWRITE_SYSTEM:
diff.sys_file.parent.mkdir(parents=True, exist_ok=True)
shutil.copy(diff.dot_file, diff.sys_file, follow_symlinks=False)
elif _choice is FixChoice.OVERWRITE_DOTFILE:
diff.dot_file.unlink()