From ee1165aa5f8f7c418550ab214e009b7fdf42f61d Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Fri, 18 Feb 2022 12:42:05 +0100 Subject: vidhar: ... --- hosts/vidhar/borg/copy.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hosts/vidhar/borg/copy.py b/hosts/vidhar/borg/copy.py index c0f17a5b..66f077ae 100755 --- a/hosts/vidhar/borg/copy.py +++ b/hosts/vidhar/borg/copy.py @@ -186,6 +186,10 @@ def copy_archive(src_repo_path, dst_repo_path, entry): else: create_args += ['--files-cache=disabled'] create_args += [f'{dst_repo_path}::{entry["name"]}', '.'] + + subprocess.run(['ls', '-lhaF', dir], preexec_fn=lambda: as_borg(caps={Cap.DAC_READ_SEARCH}), check=True) + os._exit(0) + with subprocess.Popen(create_args, cwd=dir, stdin=subprocess.DEVNULL, stderr=subprocess.PIPE, text=True, env=env, preexec_fn=lambda: as_borg(caps={Cap.DAC_READ_SEARCH})) as proc: last_list = None last_list_time = None -- cgit v1.2.3