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 548163 - Nautilus displays wrong error message for too long file names
Nautilus displays wrong error message for too long file names
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: gio
2.17.x
Other All
: Normal normal
: ---
Assigned To: Alexander Larsson
gtkdev
Depends on:
Blocks: 548844 591969
 
 
Reported: 2008-08-17 18:27 UTC by Leonardo Ferreira Fontenelle
Modified: 2009-08-16 14:06 UTC
See Also:
GNOME target: ---
GNOME version: 2.23/2.24



Description Leonardo Ferreira Fontenelle 2008-08-17 18:27:27 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.
Comment 1 Cosimo Cecchi 2008-08-21 11:04:09 UTC
Confirmed in 2.23.90.
Comment 2 Cosimo Cecchi 2008-08-21 11:26:49 UTC
-> 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.
Comment 3 Matthias Clasen 2008-11-28 08:07:43 UTC
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.
Comment 4 Vincent Untz 2009-01-30 23:56:52 UTC
Hrm, the fix doesn't use G_IO_ERROR_FILENAME_TOO_LONG, though. Is this something we could do?
Comment 5 Matthias Clasen 2009-01-31 02:56:31 UTC
We don't ?

g_io_error_from_errno() should turn ENAMETOOLONG into G_IO_ERROR_FILENAME_TOO_LONG, certainly.
Comment 6 Vincent Untz 2009-01-31 03:35:29 UTC
Hrm, my bad, apologies.