[recipes] Save clipboard contents in the same directory



commit 101593aa0ade632ce52082fe721f54bb49b3eb94
Author: Matthias Clasen <mclasen redhat com>
Date:   Sat Feb 18 16:39:49 2017 -0500

    Save clipboard contents in the same directory

 src/gr-image-viewer.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/gr-image-viewer.c b/src/gr-image-viewer.c
index e847cfe..10fda33 100644
--- a/src/gr-image-viewer.c
+++ b/src/gr-image-viewer.c
@@ -338,14 +338,14 @@ image_received (GtkClipboard *clipboard,
 
         if (pixbuf) {
                 GrRotatedImage ri;
-                const char *dir;
+                g_autofree char *dir = NULL;
                 g_autofree char *path = NULL;
                 int fd;
                 g_autoptr(GOutputStream) stream = NULL;
                 g_autoptr(GError) error = NULL;
 
-                dir = get_user_data_dir ();
-                g_mkdir_with_parents (dir, S_IRWXU | S_IRWXG | S_IRWXO);
+                dir = g_build_filename (get_user_data_dir (), "images", NULL);
+                g_mkdir_with_parents (dir, 0755);
 
                 path = g_build_filename (dir, "clipboardXXXXXX.png", NULL);
                 fd = g_mkstemp (path);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]