summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Mikhaylenko <alexm@gnome.org>2020-12-01 18:37:39 +0500
committerAlexander Mikhaylenko <alexm@gnome.org>2020-12-01 18:37:39 +0500
commit6b2da59dca63cc23d0a2400bf178c8d409e60aae (patch)
tree297b583e6dab0914c52f0bc45e79a2203141e889
parenta69f5eefb4855218f87262fd44de96903f7ca508 (diff)
downloadgnome-screenshot-6b2da59dca63cc23d0a2400bf178c8d409e60aae.tar.gz
Revert "backend-shell: Use /tmp to save temporary file"
This reverts commit a69f5eefb4855218f87262fd44de96903f7ca508.
-rw-r--r--src/screenshot-backend-shell.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/screenshot-backend-shell.c b/src/screenshot-backend-shell.c
index 9c686d1..84c5ead 100644
--- a/src/screenshot-backend-shell.c
+++ b/src/screenshot-backend-shell.c
@@ -42,14 +42,13 @@ screenshot_backend_shell_get_pixbuf (ScreenshotBackend *backend,
GdkRectangle *rectangle)
{
g_autoptr(GError) error = NULL;
- g_autofree gchar *tmp_dirname = NULL, *path = NULL, *filename = NULL, *tmpname = NULL;
+ g_autofree gchar *path = NULL, *filename = NULL, *tmpname = NULL;
GdkPixbuf *screenshot = NULL;
const gchar *method_name;
GVariant *method_params;
GDBusConnection *connection;
- tmp_dirname = g_strdup_printf ("gnome-screenshot-%s", g_get_user_name ());
- path = g_build_filename (g_get_tmp_dir (), tmp_dirname, NULL);
+ path = g_build_filename (g_get_user_cache_dir (), "gnome-screenshot", NULL);
g_mkdir_with_parents (path, 0700);
tmpname = g_strdup_printf ("scr-%d.png", g_random_int ());