[gegl] magick-load: clobber path if it starts with a dash
- From: Øyvind "pippin" Kolås <ok src gnome org>
 
- To: commits-list gnome org
 
- Cc: 
 
- Subject: [gegl] magick-load: clobber path if it starts with a dash
 
- Date: Thu, 23 Dec 2021 23:21:47 +0000 (UTC)
 
commit f4b308386c2a429a828ffc04277a3da4eaac9629
Author: Øyvind Kolås <pippin gimp org>
Date:   Fri Dec 24 00:20:54 2021 +0100
    magick-load: clobber path if it starts with a dash
 operations/common/magick-load.c | 4 ++++
 1 file changed, 4 insertions(+)
---
diff --git a/operations/common/magick-load.c b/operations/common/magick-load.c
index 3de376026..0224db47d 100644
--- a/operations/common/magick-load.c
+++ b/operations/common/magick-load.c
@@ -52,6 +52,10 @@ load_cache (GeglProperties *op_magick_load)
       filename = g_build_filename (g_get_tmp_dir (), "gegl-magick.png", NULL);
 
       argv[1] = g_strdup_printf ("%s[0]", op_magick_load->path);
+      if (argv[1][0]=='-') /* clobber argument if path starts with a dash     */
+        argv[1][0]='_';    /* which when controlling the file system leads
+                              to being able to selection parameters for
+                              imagemagic.  */
       argv[2] = filename;
       if (!g_spawn_sync (NULL, argv, NULL,
                          G_SPAWN_STDOUT_TO_DEV_NULL|G_SPAWN_STDERR_TO_DEV_NULL,
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]