From f2960a910d39c9078feb4606cde1efbb5de08714 Mon Sep 17 00:00:00 2001 From: Christian Dywan Date: Tue, 4 Sep 2012 18:39:24 +0200 Subject: [PATCH] Ensure temporary download dir exists --- midori/midori-browser.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/midori/midori-browser.c b/midori/midori-browser.c index 87db0de6..0536cd97 100644 --- a/midori/midori-browser.c +++ b/midori/midori-browser.c @@ -1113,7 +1113,7 @@ midori_browser_save_resources (MidoriView* view, GList* resources = webkit_web_data_source_get_subresources (data_source); GList* list; - g_mkdir (folder, 0700); + katze_mkdir_with_parents (folder, 0700); for (list = resources; list; list = g_list_next (list)) { @@ -1498,7 +1498,10 @@ midori_browser_download_prepare_destination_uri (WebKitDownload* download, g_free (suggested_filename); file_basename = g_file_get_basename (file_source); if (folder == NULL) + { download_dir = midori_paths_get_tmp_dir (); + katze_mkdir_with_parents (download_dir, 0700); + } else download_dir = folder; destination_filename = g_build_filename (download_dir, file_basename, NULL); -- 2.39.5