summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.travis.yml2
-rw-r--r--image-converter/caja-image-resizer.c7
-rw-r--r--image-converter/caja-image-rotator.c7
3 files changed, 11 insertions, 5 deletions
diff --git a/.travis.yml b/.travis.yml
index 338e1c8..ce8a750 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -72,4 +72,4 @@ env:
# - DISTRO="archlinux:latest"
- DISTRO="debian:testing"
- DISTRO="fedora:latest"
- - DISTRO="ubuntu:rolling"
+# - DISTRO="ubuntu:rolling"
diff --git a/image-converter/caja-image-resizer.c b/image-converter/caja-image-resizer.c
index 02484c1..f9ce576 100644
--- a/image-converter/caja-image-resizer.c
+++ b/image-converter/caja-image-resizer.c
@@ -258,7 +258,7 @@ run_op (CajaImageResizer *resizer)
/* FIXME: check whether new_uri already exists and provide "Replace _All", "_Skip", and "_Replace" options */
gchar *argv[6];
- argv[0] = "/usr/bin/convert";
+ argv[0] = "convert";
argv[1] = filename;
argv[2] = "-resize";
argv[3] = resizer->size;
@@ -267,8 +267,11 @@ run_op (CajaImageResizer *resizer)
pid_t pid;
- if (!g_spawn_async (NULL, argv, NULL, G_SPAWN_DO_NOT_REAP_CHILD, NULL, NULL, &pid, NULL)) {
+ if (filename == NULL || new_filename == NULL ||
+ !g_spawn_async (NULL, argv, NULL, G_SPAWN_SEARCH_PATH | G_SPAWN_DO_NOT_REAP_CHILD, NULL, NULL, &pid, NULL)) {
// FIXME: error handling
+ g_free (filename);
+ g_free (new_filename);
return;
}
diff --git a/image-converter/caja-image-rotator.c b/image-converter/caja-image-rotator.c
index a46901b..256fb76 100644
--- a/image-converter/caja-image-rotator.c
+++ b/image-converter/caja-image-rotator.c
@@ -254,7 +254,7 @@ run_op (CajaImageRotator *rotator)
/* FIXME: check whether new_uri already exists and provide "Replace _All", "_Skip", and "_Replace" options */
gchar *argv[8];
- argv[0] = "/usr/bin/convert";
+ argv[0] = "convert";
argv[1] = filename;
argv[2] = "-rotate";
argv[3] = rotator->angle;
@@ -265,8 +265,11 @@ run_op (CajaImageRotator *rotator)
pid_t pid;
- if (!g_spawn_async (NULL, argv, NULL, G_SPAWN_DO_NOT_REAP_CHILD, NULL, NULL, &pid, NULL)) {
+ if (filename == NULL || new_filename == NULL ||
+ !g_spawn_async (NULL, argv, NULL, G_SPAWN_DO_NOT_REAP_CHILD | G_SPAWN_SEARCH_PATH, NULL, NULL, &pid, NULL)) {
// FIXME: error handling
+ g_free (filename);
+ g_free (new_filename);
return;
}