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 596461 - New Folder creation in GtkFileChooserDialog doesn't catch slashes
New Folder creation in GtkFileChooserDialog doesn't catch slashes
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkFileChooser
2.18.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
Federico Mena Quintero
Depends on:
Blocks:
 
 
Reported: 2009-09-26 20:37 UTC by Pietro Battiston
Modified: 2015-07-04 05:26 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Pietro Battiston 2009-09-26 20:37:04 UTC
1) In any app (using GtkFileChooserDialog to save: an example is gedit), choose "Save".
2) Click the "Browse for other folders" expander
3) Click "Create Folder"
4) type in a name such as "a/b"
5) The following error message is shown:

"The folder could not be created", "Error creating directory: no such file or directory"


For reference, if instead such a name is chosen for a new folder in Nautilus, the following, right, message, is shown:

"The item could not be renamed", "Sorry, could not rename "untitled folder" to "a/b": Slashes are not allowed in filenames".

(evidently, in the FileChooserDialog, the presence of "/" must be catched)



Another way to see it is that if instead a folder "a" already exists, executing operations 1)-4) creates a folder "b" _inside_ "a", which again is not what an user would expect.
Comment 1 Matthias Clasen 2013-02-11 06:40:06 UTC

*** This bug has been marked as a duplicate of bug 593410 ***
Comment 2 Pietro Battiston 2013-02-11 07:41:27 UTC
Matthias: notice this is about folders creation, not about the filename. While I understand that a user may want to write in the address bar the full path of a file to be saved in a given subdir, I think it makes less sense to write a full path as the name of a folder which was just created. Or if this is done, I expect no error message, but rather than all required dirs are created.

So I don't think this is a duplicate - but I'm not reverting your action, maybe you have in mind something I don't understand.
Comment 3 Matthias Clasen 2015-07-04 05:26:18 UTC
We warn about invalid names on directory creation now