[gnome-desktop/wip/hadess/fix-thumbnailing-in-flatpaks] thumbnail: Fix non-working thumbnailer in Flatpak




commit bda611c10824d66d6b6ce0a223c8b4eb8966b523
Author: Bastien Nocera <hadess hadess net>
Date:   Mon Feb 22 16:42:38 2021 +0100

    thumbnail: Fix non-working thumbnailer in Flatpak
    
    In a Flatpak, $FLATPAK_SANDBOX_DIR might be set, but the directory might
    not exist. This means that the thumbnailing sandbox might fail to start
    because the shared directory is missing.
    
    (test-desktop-thumbnail:6): GnomeDesktop-DEBUG: 16:37:21.007: Thumbnail script ('evince-thumbnailer -s %s 
%u %o') failed for 'file:///home/hadess/foo.cbz': Could not create temporary sandbox directory

 libgnome-desktop/gnome-desktop-thumbnail-script.c | 1 +
 1 file changed, 1 insertion(+)
---
diff --git a/libgnome-desktop/gnome-desktop-thumbnail-script.c 
b/libgnome-desktop/gnome-desktop-thumbnail-script.c
index c46d2132..66b3db99 100644
--- a/libgnome-desktop/gnome-desktop-thumbnail-script.c
+++ b/libgnome-desktop/gnome-desktop-thumbnail-script.c
@@ -992,6 +992,7 @@ script_exec_new (const char  *uri,
           goto bail;
         }
 
+      g_mkdir_with_parents (sandbox_dir, 0700);
       tmpl = g_build_filename (sandbox_dir, "gnome-desktop-thumbnailer-XXXXXX", NULL);
       exec->outdir = g_mkdtemp (tmpl);
       if (!exec->outdir)


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