mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-08-06 16:55:43 +08:00
fix bootlog params copying from other prefix (#31381)
* fix * also in prefix * no d * get it from the path
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user