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 565224 - Give immediate feedback when typing an invalid or existing file name
Give immediate feedback when typing an invalid or existing file name
Status: RESOLVED OBSOLETE
Product: nautilus
Classification: Core
Component: File and Folder Operations
2.24.x
Other All
: Normal normal
: ---
Assigned To: Nautilus Maintainers
Nautilus Maintainers
Depends on:
Blocks:
 
 
Reported: 2008-12-21 02:51 UTC by Philip Ganchev
Modified: 2021-06-18 15:17 UTC
See Also:
GNOME target: ---
GNOME version: 2.23/2.24



Description Philip Ganchev 2008-12-21 02:51:02 UTC
Please describe the problem:
When a user tries to create a file name that contains an invalid character or already exists in the directory, she only gets an error message after laboriously typing a file name. Then she has to dismiss the error message. And now all her typing is lost because the file name has reverted to the original.

Steps to reproduce:
1. Select a file in a folder
2. Press F2 to start in-place rename mode
3. Press RightArrow to move the caret to the end of the file stem.
4. Type "a very elaborate file name /"
5. Press Enter to accept the file name

Actual results:
The name reverts to the original; a modal monologue pops up away from the user's locus of attention, saying 'Sorry, could not rename "interesting.txt" to "interesting/.txt": Slashes are not allowed in filenames'. By now, the user's work of editing the file name, is lost. And now she has to click "OK", an operation that has GOMS efficiency of 0.

Expected results:
After the user types the invalid character "/", the character is not entered into the file name. A tool tip appears under the file name field, saying "/ < > are invalid characters in file names." (without the quotes).

Does this happen every time?
Yes.

Other information:
Similarly, when the user enters a file name that is already taken, a tool tip should appear under the file name field, saying "This file name is already taken.", and the file in question should be highlighted. Pressing Enter should have no effect.
Comment 1 Helder 2013-03-11 11:15:37 UTC
Copying here from
https://bugs.launchpad.net/ubuntu/+source/nautilus/+bug/1153271

----
1. Create a file 'Example' in any folder
2. Select it
3. Press F2 to allow changing its name
4. Replace by some invalid name such as "Example/Foo" (which contains a bar "/")
5. Confirm by pressing ENTER

There will be this warning (in Portuguese):
----
Não foi possível renomear o item.
Desculpe, não foi possível renomear "Example" para "Example/Foo": Barras não são permitidas nos nomes dos arquivos
----
and the new text "Example/Foo" will be gone.

It would be better if after the warning is closed, nautilus would focus on the field for renaming the file, and not delete the new name so the user can easily fix the invalid character (e.g. replace "/" by "-"). This is particularly important if the new name chosen by the user is long, because in that case it would not be fun having to type it again.
----
Comment 2 André Klapper 2021-06-18 15:17:49 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.