From d38acc1d6952b348178667ad15217d64eb3a2ab7 Mon Sep 17 00:00:00 2001 From: chendexi Date: Mon, 1 Dec 2025 16:56:06 +0800 Subject: [PATCH] fix buildupload error of mkdir wrong dir --- src/cmd-buildupload | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/cmd-buildupload b/src/cmd-buildupload index 9f95d8d5..ff6d1d64 100755 --- a/src/cmd-buildupload +++ b/src/cmd-buildupload @@ -128,10 +128,14 @@ def cmd_upload_scp(args): ssh_client.set_missing_host_key_policy(paramiko.AutoAddPolicy()) ssh_client.connect(hostname=host, username=username, key_filename=args.ssh_key) - remote_dir = os.path.join(path, f'{args.build}/{args.arch}') - if not remote_path_exists(ssh_client, remote_dir): - print(f"Remote directory {remote_dir} does not exist, creating it...") - ssh_client.exec_command(f'mkdir -p {remote_dir}') + for arch in builds.get_build_arches(args.build): + if len(args.arch) > 0 and arch not in args.arch: + print(f"Skipping upload of arch {arch} upon user request") + continue + remote_dir = os.path.join(path, f'{args.build}/{arch}') + if not remote_path_exists(ssh_client, remote_dir): + print(f"Remote directory {remote_dir} does not exist, creating it...") + ssh_client.exec_command(f'mkdir -p {remote_dir}') with SCPClient(ssh_client.get_transport()) as scp_client: for arch in builds.get_build_arches(args.build): -- Gitee