From 240e554604f5c47609b006f379ae853f4c29843b Mon Sep 17 00:00:00 2001 From: deadc0de6 Date: Sun, 15 Nov 2020 15:18:22 +0100 Subject: [PATCH] ensure file exists for mirroring rights --- dotdrop/utils.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dotdrop/utils.py b/dotdrop/utils.py index 4d6b06d..eeaba8a 100644 --- a/dotdrop/utils.py +++ b/dotdrop/utils.py @@ -300,6 +300,8 @@ def dependencies_met(): def mirror_file_rights(src, dst): """mirror file rights of src to dst (can rise exc)""" + if not os.path.exists(src) or not os.path.exists(dst): + return rights = get_file_perm(src) os.chmod(dst, rights)