From e31df16309500af2e2658f54006c6dc7dfa4ba0a Mon Sep 17 00:00:00 2001 From: Ozzieisaacs Date: Tue, 24 Sep 2019 19:00:47 +0200 Subject: [PATCH] Revert bug in updater.py preventing new files from being created --- cps/updater.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cps/updater.py b/cps/updater.py index 47a9c0cd..10d1995e 100644 --- a/cps/updater.py +++ b/cps/updater.py @@ -168,8 +168,9 @@ class Updater(threading.Thread): for file_ in files: src_file = os.path.join(src_dir, file_) dst_file = os.path.join(dst_dir, file_) - permission = os.stat(dst_file) if os.path.exists(dst_file): + if change_permissions: + permission = os.stat(dst_file) log.debug('Remove file before copy: %s', dst_file) os.remove(dst_file) else: