Bug 117538

Summary: [GTK] MiniBrowser doesn't solve the saving location when there are no XDG settings
Product: WebKit Reporter: Andres Gomez Garcia <agomez>
Component: WebKitGTKAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: cgarcia, commit-queue, eocanha, gustavo, mrobinson, pnormand, rego
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

Description Andres Gomez Garcia 2013-06-12 05:04:02 PDT
The default WebKit2Gtk "decide-destination" method used in MiniBrowser gets the default downloads destination using G_USER_DIRECTORY_DOWNLOAD and the XDG specification.

XDG settings may not be present in very bare home directories like when using a chroot. This causes a failure when deciding the destination through the default method.
Comment 1 Andres Gomez Garcia 2013-06-12 05:05:14 PDT
This problem can be corrected locally in MiniBrowser but it may be worth correcting actually in the default method implemented by the WebKit2Gtk library.
Comment 2 Andres Gomez Garcia 2013-06-12 05:22:50 PDT
Created attachment 204427 [details]
Patch
Comment 3 Andres Gomez Garcia 2013-06-13 07:31:36 PDT
Added Enrique to CC.
Comment 4 Carlos Garcia Campos 2013-06-19 10:06:29 PDT
Comment on attachment 204427 [details]
Patch

This looks good to me, but I think this is actually a bug in the default implementation of decide-destination. Let's fix it in WebKitDownload and all other apps using the API will benefit from it. Note that in this case we would be updating the internal destination to NULL and emitting the notify signal.
Comment 5 Andres Gomez Garcia 2013-06-20 03:36:19 PDT
(In reply to comment #4)
> (From update of attachment 204427 [details])
> This looks good to me, but I think this is actually a bug in the default implementation of decide-destination. Let's fix it in WebKitDownload and all other apps using the API will benefit from it. Note that in this case we would be updating the internal destination to NULL and emitting the notify signal.

True.

Moving then to the proper component.
Comment 6 Andres Gomez Garcia 2013-06-20 03:42:51 PDT
Created attachment 205068 [details]
Patch
Comment 7 WebKit Commit Bot 2013-06-20 03:45:06 PDT
Thanks for the patch. If this patch contains new public API please make sure it follows the guidelines for new WebKit2 GTK+ API. See http://trac.webkit.org/wiki/WebKitGTK/AddingNewWebKit2API
Comment 8 Carlos Garcia Campos 2013-06-28 01:20:11 PDT
Comment on attachment 205068 [details]
Patch

Sorry for the delay reviewing it, it looks good to me, thanks!
Comment 9 WebKit Commit Bot 2013-06-28 01:29:31 PDT
Comment on attachment 205068 [details]
Patch

Clearing flags on attachment: 205068

Committed r152155: <http://trac.webkit.org/changeset/152155>
Comment 10 WebKit Commit Bot 2013-06-28 01:29:33 PDT
All reviewed patches have been landed.  Closing bug.
Comment 11 Andres Gomez Garcia 2013-06-28 01:58:42 PDT
(In reply to comment #8)
> (From update of attachment 205068 [details])
> Sorry for the delay reviewing it, it looks good to me, thanks!

Thanks to you for the review!