From 1a1f30c4b6a4576e66badd3b7d69a501f3f0d461 Mon Sep 17 00:00:00 2001 From: Justin Newberry Date: Thu, 8 Feb 2024 19:45:55 -0500 Subject: [PATCH] fix bootlog params copying from other prefix (#31381) * fix * also in prefix * no d * get it from the path --- selfdrive/manager/helpers.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/selfdrive/manager/helpers.py b/selfdrive/manager/helpers.py index 797f4ee92e..047d0ac2d6 100644 --- a/selfdrive/manager/helpers.py +++ b/selfdrive/manager/helpers.py @@ -1,9 +1,10 @@ +import errno +import fcntl import os import sys -import fcntl -import errno -import signal +import pathlib import shutil +import signal import subprocess import tempfile import threading @@ -52,7 +53,9 @@ def write_onroad_params(started, params): def save_bootlog(): # copy current params tmp = tempfile.mkdtemp() - shutil.copytree(Params().get_param_path() + "/..", tmp, dirs_exist_ok=True) + params_dirname = pathlib.Path(Params().get_param_path()).name + params_dir = os.path.join(tmp, params_dirname) + shutil.copytree(Params().get_param_path(), params_dir, dirs_exist_ok=True) def fn(tmpdir): env = os.environ.copy()