Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

revert: fix(mac): should normalize unicode strings from file system before used in string compare #7905

Merged
merged 1 commit into from
Nov 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/nine-rings-bow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"dmg-builder": patch
---

fix dmg build when productName or executableName contains Unicode
5 changes: 0 additions & 5 deletions packages/dmg-builder/vendor/mac_alias/alias.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import os.path
import stat
import sys
from unicodedata import normalize

if sys.platform == 'darwin':
from . import osx
Expand Down Expand Up @@ -390,10 +389,6 @@ def for_file(cls, path):
st = osx.statfs(path)
vol_path = st.f_mntonname

# File and folder names in HFS+ are normalized to a form similar to NFD.
# Must be normalized (NFD->NFC) before use to avoid unicode string comparison issues.
vol_path = normalize("NFC", vol_path.decode('utf-8')).encode('utf-8')

# Grab its attributes
attrs = [osx.ATTR_CMN_CRTIME,
osx.ATTR_VOL_NAME,
Expand Down