From 0f0ea77bc99f5b224a626b1a78a8669a655b43c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B8=A0=E7=A3=8A?= Date: Fri, 2 Aug 2024 15:04:25 +0800 Subject: [PATCH] test --- common/command.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/command.py b/common/command.py index 81efec54..915d0f60 100644 --- a/common/command.py +++ b/common/command.py @@ -189,7 +189,7 @@ def zip_dir(ssh_client, father_dir, zip_dir, stdio=None): Compress files through zip :return: """ - cmd = "cd {father_dir} && zip {zip_dir}.zip -rm {zip_dir}".format(father_dir=father_dir, zip_dir=zip_dir) + cmd = "zip {father_dir}/{zip_dir}.zip -rm {father_dir}/{zip_dir}".format(father_dir=father_dir, zip_dir=zip_dir) ssh_client.exec_cmd(cmd) @@ -198,7 +198,7 @@ def zip_encrypt_dir(ssh_client, zip_password, father_dir, zip_dir, stdio=None): Compress files by encryption :return: """ - cmd = "cd {father_dir} && zip --password {zip_password} {zip_dir}.zip -rm {zip_dir}".format(zip_password=zip_password, father_dir=father_dir, zip_dir=zip_dir) + cmd = "zip --password {zip_password} {father_dir}/{zip_dir}.zip -rm {father_dir}/{zip_dir}".format(zip_password=zip_password, father_dir=father_dir, zip_dir=zip_dir) ssh_client.exec_cmd(cmd)