GNOME Bugzilla – Bug 423045
canonically equivalent filenames should conflict
Last modified: 2021-06-18 15:17:31 UTC
Nautilus should normalize filenames when checking for conflict when creating, copying or renaming files/directories. Example: Create a file "écho" and create another file "écho". Nautilus let's this happen because the first character(s) is(are) different: é U+00E9 LATIN SMALL LETTER E WITH ACUTE é U+0065 LATIN SMALL LETTER E + U+0301 COMBINING ACUTE ACCENT But for the user these mean the same. Nautilus should consider them equal. g_utf8_normalize() with G_NORMALIZE_DEFAULT can be use before comparing the strings. This behaviour should be fixed for create, copy, rename. So even if a old file has a different character sequence in its name but equivalent to the one being copied in the same directory, it should be overwritten.
blocking 423036
I think we already handle the sorting cases fine. We use g_utf8_collate and related functions. Since the filesystem doesn't make this distinction and will happily accept both écho.txt and écho.txt how should that be handled? It seems a bit strange to actively prevent people from making perfectly valid filenames.
From the first question in http://www.unicode.org/faq/normalization.html "Programs should always compare canonical-equivalent Unicode strings as equal." Filesystems are not programs they can normalize but don't have to, HFS+ and ZFS do while others don't. Besides proper Unicode conformance, preventing people from having two canonical-equivalent filenames also prevents incompatibility with applications that do normalize or prevents problems if someone would copy files to HFS+ or ZFS filesystems. Furthermore having two canonical-equivalent filenames renders them undistinguishable to the user.
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org. As part of that, we are mass-closing older open tickets in bugzilla.gnome.org which have not seen updates for a longer time (resources are unfortunately quite limited so not every ticket can get handled). If you can still reproduce the situation described in this ticket in a recent and supported software version of Files (nautilus), then please follow https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines and create a new ticket at https://gitlab.gnome.org/GNOME/nautilus/-/issues/ Thank you for your understanding and your help.