mirror of
https://github.com/ItsDrike/dotfiles.git
synced 2024-12-26 05:04:34 +00:00
Ensure system dir exists for NOTFOUND
This commit is contained in:
parent
bf5734f571
commit
449e912560
1
sync.py
1
sync.py
|
@ -296,6 +296,7 @@ def apply_fix(diff: FileDiff) -> None:
|
||||||
if _choice is FixChoice.SKIP:
|
if _choice is FixChoice.SKIP:
|
||||||
return
|
return
|
||||||
elif _choice is FixChoice.OVERWRITE_SYSTEM:
|
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)
|
shutil.copy(diff.dot_file, diff.sys_file, follow_symlinks=False)
|
||||||
elif _choice is FixChoice.OVERWRITE_DOTFILE:
|
elif _choice is FixChoice.OVERWRITE_DOTFILE:
|
||||||
diff.dot_file.unlink()
|
diff.dot_file.unlink()
|
||||||
|
|
Loading…
Reference in a new issue