Skip to content

Commit a9636f7

Browse files
authored
Prevent package from including Mac Metadata file (#640)
* Prevent package from including Mac Metadata file If `tar` is run from a macOS, by default, it will create Mac Metadata file for every file and folder which starts with ".". This change makes sure that the archives does not include Mac Metadata file.
1 parent a148338 commit a9636f7

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

source/ExportUnityPackage/export_unity_package.py

+3
Original file line numberDiff line numberDiff line change
@@ -2595,6 +2595,9 @@ def create_archive(archive_filename, input_directory, timestamp):
25952595
os.utime(filename, (FLAGS.timestamp, FLAGS.timestamp))
25962596
# Don't recurse directories.
25972597
tar_args.append("-n")
2598+
# Avoid creating mac metadata files with name started with "."
2599+
if platform.system() == "Darwin":
2600+
tar_args.append("--no-mac-metadata")
25982601
tar_args.extend(["-T", list_filename])
25992602
# Disable timestamp in the gzip header.
26002603
tar_env = os.environ.copy()

0 commit comments

Comments
 (0)