mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-04-18 06:31:28 +03:00
refact(sign): skip signed files (#14006)
Signed-off-by: fufesou <linlong1266@gmail.com>
This commit is contained in:
@@ -205,11 +205,13 @@ def sign_files(dir_path, only_ext=None):
|
|||||||
if not only_ext[i].startswith("."):
|
if not only_ext[i].startswith("."):
|
||||||
only_ext[i] = "." + only_ext[i]
|
only_ext[i] = "." + only_ext[i]
|
||||||
for root, dirs, files in os.walk(dir_path):
|
for root, dirs, files in os.walk(dir_path):
|
||||||
if "RustDeskPrinterDriver" in root or "usbmmidd_v2" in root:
|
is_signed_dir = "RustDeskPrinterDriver" in root or "usbmmidd_v2" in root
|
||||||
continue
|
|
||||||
for file in files:
|
for file in files:
|
||||||
file_path = os.path.join(root, file)
|
file_path = os.path.join(root, file)
|
||||||
_, ext = os.path.splitext(file_path)
|
_, ext = os.path.splitext(file_path)
|
||||||
|
# only sign the exe files in signed dirs
|
||||||
|
if is_signed_dir and ext not in [".exe"]:
|
||||||
|
continue
|
||||||
if only_ext and ext not in only_ext:
|
if only_ext and ext not in only_ext:
|
||||||
continue
|
continue
|
||||||
if ext in SIGN_EXTENSIONS:
|
if ext in SIGN_EXTENSIONS:
|
||||||
|
|||||||
Reference in New Issue
Block a user