GNOME Bugzilla – Bug 548163
Nautilus displays wrong error message for too long file names
Last modified: 2009-08-16 14:06:03 UTC
Please describe the problem: When renaming a file, Nautilus misreports the new filename as duplicate, but it's actually too long Steps to reproduce: 1. Have a file which name is under 255 characters 2. Rename it to something longer than that Actual results: I receive this error message: "The name \"%s\" is already used in this folder. Please use a different name." (were \"%s\" is the file name). Expected results: Nautils should display a correct error message, like "The name \"%s\" is not valid because is contains more than 255 characters." Does this happen every time? Yes. Other information: Not sure if this is about Nautilus or Gio. The file system is a local ext3, Linux kernel version 2.6.26. I know there will be no further 2.22 releases, but please check if this bug is still valid in GNOME 2.23.
Confirmed in 2.23.90.
-> glib This is a bug in GIO, as it sets G_IO_ERROR_EXISTS instead of G_IO_ERROR_FILENAME_TOO_LONG, moving. Though, in Nautilus we should handle G_IO_ERROR_FILENAME_TOO_LONG errors, as now we don't and use a generic error message, so I've cloned the bug and created bug #548844.
2008-11-28 Matthias Clasen <mclasen@redhat.com> Bug 548163 – Nautilus displays wrong error message for too long file names * glocalfile.c (g_local_file_set_display_name): Correctly set error conditions if the new name is e.g. too long. Reported by Leonardo Ferreira Fontenelle.
Hrm, the fix doesn't use G_IO_ERROR_FILENAME_TOO_LONG, though. Is this something we could do?
We don't ? g_io_error_from_errno() should turn ENAMETOOLONG into G_IO_ERROR_FILENAME_TOO_LONG, certainly.
Hrm, my bad, apologies.