After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 423045 - canonically equivalent filenames should conflict
canonically equivalent filenames should conflict
Status: RESOLVED OBSOLETE
Product: nautilus
Classification: Core
Component: File and Folder Operations
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Nautilus Maintainers
Nautilus Maintainers
Depends on:
Blocks: 423036
 
 
Reported: 2007-03-26 19:33 UTC by Denis Jacquerye
Modified: 2021-06-18 15:17 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Denis Jacquerye 2007-03-26 19:33:40 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.
Comment 1 Denis Jacquerye 2007-03-26 19:34:04 UTC
blocking 423036
Comment 2 William Jon McCann 2012-09-19 04:49:14 UTC
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.
Comment 3 Denis Jacquerye 2012-09-19 11:47:31 UTC
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.
Comment 4 André Klapper 2021-06-18 15:17:31 UTC
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.