From 5185e92ec80a9998ae00cb799dfdfbb93247dfaf Mon Sep 17 00:00:00 2001 From: rfjakob Date: Sat, 24 Jan 2026 20:12:18 +0100 Subject: macos: normalize unicode file names in forward mode (#992) Summary: Store as NFC, read as NFD. This commit resolves https://github.com/rfjakob/gocryptfs/issues/850 by addressing Unicode normalization mismatches on macOS between NFC (used by CLI tools) and NFD (used by GUI apps). The solution is inspired by Cryptomator's approach ( https://github.com/cryptomator/cryptomator/issues/264 ). Forward mode on MacOS now enforces NFC for storage but presents NFD as recommended by https://developer.apple.com/library/archive/qa/qa1173/_index.html and https://github.com/macfuse/macfuse/wiki/File-Names-(Unicode-Normalization-Forms) . See https://github.com/rfjakob/gocryptfs/pull/949 for more info. This commit does nothing for reverse mode as it is not clear if anything can be done. Reverse mode can not influence how the file names are stored, hence mapping normalized names back to what is actually on disk seems difficult.--- go.mod | 1 + 1 file changed, 1 insertion(+) (limited to 'go.mod') diff --git a/go.mod b/go.mod index c608e6f..986f329 100644 --- a/go.mod +++ b/go.mod @@ -13,4 +13,5 @@ require ( golang.org/x/crypto v0.45.0 golang.org/x/sys v0.38.0 golang.org/x/term v0.37.0 + golang.org/x/text v0.31.0 ) -- cgit v1.2.3