Skip to content
Permalink
Browse files
[GTK] MiniBrowser doesn't solve the saving location when there are no…
… XDG settings

https://bugs.webkit.org/show_bug.cgi?id=117538

Patch by Andres Gomez <agomez@igalia.com> on 2013-06-28
Reviewed by Carlos Garcia Campos.

If the XDG specification is not working for the "Downloads"
directory, let's use HOME as fallback.

* UIProcess/API/gtk/WebKitDownload.cpp:
(webkitDownloadDecideDestination):

Canonical link: https://commits.webkit.org/136210@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@152155 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
tanty authored and webkit-commit-queue committed Jun 28, 2013
1 parent 5b00ff9 commit 5e00ed49e1c9c6bd92baabfbae200ab08b2466bd
Showing with 19 additions and 1 deletion.
  1. +13 −0 Source/WebKit2/ChangeLog
  2. +6 −1 Source/WebKit2/UIProcess/API/gtk/WebKitDownload.cpp
@@ -1,3 +1,16 @@
2013-06-28 Andres Gomez <agomez@igalia.com>

[GTK] MiniBrowser doesn't solve the saving location when there are no XDG settings
https://bugs.webkit.org/show_bug.cgi?id=117538

Reviewed by Carlos Garcia Campos.

If the XDG specification is not working for the "Downloads"
directory, let's use HOME as fallback.

* UIProcess/API/gtk/WebKitDownload.cpp:
(webkitDownloadDecideDestination):

2013-06-28 Dariusz Frankiewicz <d.frankiewic@samsung.com>

[EFL][WK2] Add spellcheck API tests in unit tests.
@@ -114,7 +114,12 @@ static gboolean webkitDownloadDecideDestination(WebKitDownload* download, const
return FALSE;

GOwnPtr<char> filename(g_strdelimit(g_strdup(suggestedFilename), G_DIR_SEPARATOR_S, '_'));
GOwnPtr<char> destination(g_build_filename(g_get_user_special_dir(G_USER_DIRECTORY_DOWNLOAD), filename.get(), NULL));
const gchar *downloadsDir = g_get_user_special_dir(G_USER_DIRECTORY_DOWNLOAD);
if (!downloadsDir) {
// If we don't have XDG user dirs info, set just to HOME.
downloadsDir = g_get_home_dir();
}
GOwnPtr<char> destination(g_build_filename(downloadsDir, filename.get(), NULL));
GOwnPtr<char> destinationURI(g_filename_to_uri(destination.get(), 0, 0));
download->priv->destinationURI = destinationURI.get();
g_object_notify(G_OBJECT(download), "destination");

0 comments on commit 5e00ed4

Please sign in to comment.