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 464383 - No error reported when mkdir fails
No error reported when mkdir fails
Status: RESOLVED FIXED
Product: libgnomeui
Classification: Deprecated
Component: file-chooser
CVS HEAD
Other Linux
: Normal normal
: future
Assigned To: Federico Mena Quintero
Federico Mena Quintero
Depends on:
Blocks:
 
 
Reported: 2007-08-07 14:46 UTC by Richard Hult
Modified: 2007-10-12 07:02 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Don't silently abort on errors (536 bytes, patch)
2007-08-07 14:47 UTC, Richard Hult
none Details | Review

Description Richard Hult 2007-08-07 14:46:56 UTC
Tee gnomevfs filechooser backend currently ignores errors when a folder can't be created. The reason is that it sets up the gnome_vfs_async_xfer() call with a ABORT mode for errors, which makes the callback not be called. The result is that the backend doesn't get a chance to propagate the error. Will attach a one-liner.

Note however that this probably also needs to tweaking to the UI, since the UI currently does show an error when creating a folder fails (something like "couldn't access <the non-created directory name here>") since it immediately tries to enter that directory.
Comment 1 Richard Hult 2007-08-07 14:47:32 UTC
Created attachment 93215 [details] [review]
Don't silently abort on errors
Comment 2 Kjartan Maraas 2007-08-08 09:03:45 UTC
Federico? Can we get this fixed in 2.19.x?
Comment 3 Federico Mena Quintero 2007-08-08 19:35:48 UTC
(In reply to comment #1)
> Created an attachment (id=93215) [edit]
> Don't silently abort on errors

Oooh, good catch.

It's going to take me a few hours to get a 2.19 build environment up and running.  However I had an old trunk and in there, the Unix backend works fine --- I get a "Could not create folder, blah blah, permission denied" for a r-x folder.  So the upstream code is probably fine.

What happens with your patch for libgnomeui?
Comment 4 Richard Hult 2007-08-10 08:16:54 UTC
I have the same problem, not having the 2.19 build setup (the fix was done in maemo). If someone has a build setup already and tries the patch, what I would try is "chmod a-w foo/" and then try to create a folder inside foo from the filechooser in save mode. Currently it shows an error after the tried creation when the filechooser tries to enter the new folder that doesn't exist (says something like "couldn't read the file" or something like that). The right result would be to show a better error like "couldn't create folder" or so.

I will try to setup the build myself but I'm heading off for vacation after today so it might take a while.
Comment 5 Kjartan Maraas 2007-10-01 12:29:02 UTC
Tried this now and got an error:

The folder contents could not be displayed

error accessing 'file:///home/kmaraas/foo/test': File not found

This is using fedora development packages.
Comment 6 Federico Mena Quintero 2007-10-12 07:02:46 UTC
With the changes from bug #485922 now I get a reasonable error message.  Thanks again for the patch, Richard :)

Committed to trunk and gnome-2-20:

2007-10-12  Federico Mena Quintero  <federico@novell.com>

    	Fix http://bugzilla.gnome.org/show_bug.cgi?id=464383 - In the file
	chooser, errors are not reported correctly when creating a folder
	fails.

    	* file-chooser/gtkfilesystemgnomevfs.c
    	(gtk_file_system_gnome_vfs_create_folder): Use
    	GNOME_VFS_XFER_ERROR_MODE_QUERY instead of
    	GNOME_VFS_XFER_ERROR_MODE_ABORT so that our progress/error
    	callback will be called if the mkdir() fails.  Patch by Richard
    	Hult <richard@imendio.com>.