]> spindle.queued.net Git - midori/commitdiff
Use midori-prefixed temp folder in midori_view_save_source
authorChristian Dywan <christian@twotoasts.de>
Sat, 12 May 2012 02:26:02 +0000 (04:26 +0200)
committerChristian Dywan <christian@twotoasts.de>
Sat, 12 May 2012 02:26:02 +0000 (04:26 +0200)
midori/midori-view.c

index 9c89d338ea6349d13f2e877263ec6a32d34d4b1f..00863f480970aa16493993ed360869f57c357f19 100644 (file)
@@ -5299,11 +5299,11 @@ midori_view_save_source (MidoriView* view,
     if (!outfile)
     {
         gchar* extension = midori_view_get_uri_extension (uri);
-        gchar* filename = g_strdup_printf ("%uXXXXXX%s",
+        unique_filename = g_strdup_printf ("%s/midori-%s/%uXXXXXX%s",
+            g_get_tmp_dir (), g_get_user_name (),
             g_str_hash (uri), midori_view_fallback_extension (view, extension));
         g_free (extension);
-        fd = g_file_open_tmp (filename, &unique_filename, NULL);
-        g_free (filename);
+        fd = g_mkstemp (unique_filename);
     }
     else
     {