summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Nocera <hadess@hadess.net>2021-02-22 16:42:38 +0100
committerBastien Nocera <hadess@hadess.net>2021-02-22 16:42:38 +0100
commitbda611c10824d66d6b6ce0a223c8b4eb8966b523 (patch)
tree2ca3b85dd9405909e0ace952fe4166d11b585649
parentfb79d004ec725719a44183ddb18a19cda6f8e277 (diff)
downloadgnome-desktop-bda611c10824d66d6b6ce0a223c8b4eb8966b523.tar.gz
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
-rw-r--r--libgnome-desktop/gnome-desktop-thumbnail-script.c1
1 files changed, 1 insertions, 0 deletions
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)