From 449e91256090e05ebc764744c82bd8e66a34331b Mon Sep 17 00:00:00 2001 From: ItsDrike Date: Thu, 2 Feb 2023 21:12:45 +0100 Subject: [PATCH] Ensure system dir exists for NOTFOUND --- sync.py | 1 + 1 file changed, 1 insertion(+) diff --git a/sync.py b/sync.py index 83d299b..5e3cefc 100755 --- a/sync.py +++ b/sync.py @@ -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()