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 593410 - There is no warning message when inserting the forbidden symbol "/" in a filename
There is no warning message when inserting the forbidden symbol "/" in a file...
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkFileChooser
unspecified
Other Linux
: Normal minor
: ---
Assigned To: gtk-bugs
Federico Mena Quintero
: 641094 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2009-08-28 16:55 UTC by Alessandro
Modified: 2015-05-10 04:35 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch (1.58 KB, patch)
2012-02-22 16:36 UTC, Abhishek.Sri14
none Details | Review
Give-a-better-error-message-when-invalid-path-entered (2.18 KB, patch)
2013-05-15 11:52 UTC, Timothy Arceri
none Details | Review

Description Alessandro 2009-08-28 16:55:29 UTC
When the user tries to save a file from the "Save" option and Inputs labels containing "/" nothing happens, the "Save" dialog remains opened and he is not warned with an error message.

An average user cannot understand this, since the user is not informed of what mistake he has done!

In some cases a very technical message is prompted:
"Error stating /file/path/xxx/xxxxx : no such file or directory"

That's useless because only experienced users are able to understand its meaning, but they don't even need it because they're aware that "/" cannot stand into a filename! Newbies are very puzzled by that message instead, because it doesn't actually say WHAT their mistake was: typing "/" inside the name!

I post an alternative message that was proposed on launchpad (<a href="https://bugs.launchpad.net/hundredpapercuts/+bug/393158">Bug #393158</a> ):

"File names cannot contain "/" "
"If you intend to save the file in a folder "xx", First Create folder "xx" in the location"

It is very easy to fix and a small step towards better usability. Thank you!!
Comment 1 Matthias Clasen 2010-08-05 04:47:23 UTC
Should be fixed together with bug 593372, probably
Comment 2 Federico Mena Quintero 2011-02-22 19:53:00 UTC
The suggested error message needs to be handled in gtkfilechooserdefault.c:name_entry_get_parent_info_cb().  This is where we decide what to do when you type "subfolder/blah.txt".

I'd like to keep the behavior where you *are* able to save something in "existing_subfolder/newfile.txt".
Comment 3 Alessandro 2011-02-22 21:01:46 UTC
@ Federico: i think that current behaviour should be modified, though. I mean, I know that "/" refers to a subfolder and you know that... the average user doesn't.
And moreover, he doesn't have to know it; he/she only deserve to know that "/" cannot be put into a filename! There is a whole world out there, out of geekistan, which still deserves the best (and plainest) GNU experience   ;-)
Comment 4 Jack River 2012-01-03 19:07:37 UTC
@Alessandro, who is this average user?

Is anyone working on this bug, or should I make an attempt?
Comment 5 Federico Mena Quintero 2012-01-03 21:43:22 UTC
Feel free to work on this.  You have to see what error code you get in the function I mentioned; if it's something like "folder not found", then you can use Alessandro's proposed error message.
Comment 6 Federico Mena Quintero 2012-01-03 22:40:12 UTC
To be more specific, you need to change the very last "else" in name_entry_get_parent_info_cb().  The call to error_changing_folder_dialog() is the error message you see right now.  You'll want to make a new function, something like error_with_nonexistent_parent_folder(), and call it from there.
Comment 7 Abhishek.Sri14 2012-02-22 16:36:39 UTC
Created attachment 208204 [details] [review]
patch
Comment 8 Matthias Clasen 2013-02-11 06:40:06 UTC
*** Bug 596461 has been marked as a duplicate of this bug. ***
Comment 9 Timothy Arceri 2013-05-15 11:52:37 UTC
Created attachment 244306 [details] [review]
Give-a-better-error-message-when-invalid-path-entered

I've attached a patch to provide a more useful error message to the user.
Comment 10 Timothy Arceri 2013-05-15 12:06:14 UTC
Hmm it could be likely that the old error message is never actually called any-more. That call may be able to be removed completely.
Comment 11 Timothy Arceri 2013-05-15 12:20:27 UTC
Also Bug 596461 is not a duplicate of this bug, its a separate issue.
Comment 12 Pietro Battiston 2013-05-15 12:33:40 UTC
> Hmm it could be likely that the old error message is never actually called
> any-more. That call may be able to be removed completely.

I don't know if you refer to a later version, but it still appears in libgtk 3.4.2, used with gedit 3.4.2.
Comment 13 Timothy Arceri 2013-05-15 21:45:47 UTC
(In reply to comment #12)
> > Hmm it could be likely that the old error message is never actually called
> > any-more. That call may be able to be removed completely.
> 
> I don't know if you refer to a later version, but it still appears in libgtk
> 3.4.2, used with gedit 3.4.2.

I was referring to my patch. I have and if/else that allows the old message to be called if the error code doesnt match, I'm not sure if that will ever happen though.
Comment 14 Timothy Arceri 2013-05-15 22:29:25 UTC
Please ignore my patch for now I'm working on a new one that also fixes Bug 596461 at the same time.
Comment 15 Timothy Arceri 2013-06-22 10:12:52 UTC
*** Bug 641094 has been marked as a duplicate of this bug. ***
Comment 16 Matthias Clasen 2015-05-10 04:35:56 UTC
This was recently addressed