summaryrefslogtreecommitdiff
path: root/image-converter/caja-image-rotator.c
diff options
context:
space:
mode:
Diffstat (limited to 'image-converter/caja-image-rotator.c')
-rw-r--r--image-converter/caja-image-rotator.c7
1 files changed, 5 insertions, 2 deletions
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;
}