From f0a77e2677c235b3608c7b1dd85ad38bbbe392ae Mon Sep 17 00:00:00 2001 From: Russell Keith-Magee Date: Thu, 26 Oct 2023 06:53:48 +0800 Subject: [PATCH] Use copy rather than copyfile to preserve permissions. --- src/briefcase/platforms/macOS/utils.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/briefcase/platforms/macOS/utils.py b/src/briefcase/platforms/macOS/utils.py index 6d5c8642f..e0be7226c 100644 --- a/src/briefcase/platforms/macOS/utils.py +++ b/src/briefcase/platforms/macOS/utils.py @@ -243,11 +243,9 @@ def merge_app_packages( f"between sources; ignoring {source_app_packages.suffix[1:]} version." ) else: - # The file doesn't exist yet; copy it as is, and store the - # digest for later comparison - self.tools.shutil.copyfile(source_path, target_path) - # Ensure permissions as well. - self.tools.shutil.copymode(source_path, target_path) + # The file doesn't exist yet; copy it as is (including + # permissions), and store the digest for later comparison + self.tools.shutil.copy(source_path, target_path) digests[relative_path] = sha256_file_digest(source_path) # Call lipo on each dylib that was found to create the fat version.