diff options
author | Christian Dywan <christian@twotoasts.de> | 2012-07-08 23:03:47 +0200 |
---|---|---|
committer | Christian Dywan <christian@twotoasts.de> | 2012-07-08 23:03:47 +0200 |
commit | 7d93615fbf10696035ddffcea8f16061163ab3c3 (patch) | |
tree | 61d959c88c97e54be1717f192003864c11770485 /midori/midori-browser.c | |
parent | 264c731f4721d8cd111a3ff6f2fa3ffb67171b5a (diff) | |
download | midori-7d93615fbf10696035ddffcea8f16061163ab3c3.tar.gz |
Handle tmp folder as midori_view_get_tmp_dir
Diffstat (limited to 'midori/midori-browser.c')
-rw-r--r-- | midori/midori-browser.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/midori/midori-browser.c b/midori/midori-browser.c index e765cdec..35ff6590 100644 --- a/midori/midori-browser.c +++ b/midori/midori-browser.c @@ -1385,27 +1385,19 @@ midori_browser_download_prepare_destination_uri (WebKitDownload* download, gchar* download_dir = NULL; gchar* destination_uri; gchar* destination_filename; - gchar* midori_tmp_dir; suggested_filename = sokoke_get_download_filename (download); file_source = g_file_new_for_uri (suggested_filename); g_free (suggested_filename); file_basename = g_file_get_basename (file_source); if (folder == NULL) - { - midori_tmp_dir = g_strconcat ("midori-", g_get_user_name (), NULL); - download_dir = g_build_filename (g_get_tmp_dir (), midori_tmp_dir, NULL); - g_free (midori_tmp_dir); - } + download_dir = midori_view_get_tmp_dir (); else download_dir = (gchar*)folder; destination_filename = g_build_filename (download_dir, file_basename, NULL); destination_filename = midori_browser_download_prepare_filename (destination_filename); destination_uri = g_filename_to_uri (destination_filename, NULL, NULL); - if (!g_file_test (download_dir, G_FILE_TEST_EXISTS)) - katze_mkdir_with_parents (download_dir, 0700); - g_free (file_basename); if (folder == NULL) g_free (download_dir); |