GNOME Bugzilla – Bug 464383
No error reported when mkdir fails
Last modified: 2007-10-12 07:02:46 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.
Created attachment 93215 [details] [review] Don't silently abort on errors
Federico? Can we get this fixed in 2.19.x?
(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?
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.
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.
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>.