From d140e44d7341102ce05b88985fe1f08983076586 Mon Sep 17 00:00:00 2001 From: Martijn Braam Date: Mon, 11 Jan 2021 16:43:48 +0100 Subject: [PATCH] Fix path for the generated picture and improve error message --- main.c | 2 +- process_pipeline.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/main.c b/main.c index 92e0223..558bb4d 100644 --- a/main.c +++ b/main.c @@ -337,7 +337,7 @@ on_open_last_clicked(GtkWidget *widget, gpointer user_data) } sprintf(uri, "file://%s", last_path); if (!g_app_info_launch_default_for_uri(uri, NULL, &error)) { - g_printerr("Could not launch image viewer: %s\n", error->message); + g_printerr("Could not launch image viewer for '%s': %s\n", uri, error->message); } } diff --git a/process_pipeline.c b/process_pipeline.c index b389e1c..de8416c 100644 --- a/process_pipeline.c +++ b/process_pipeline.c @@ -331,6 +331,7 @@ post_process_finished(GSubprocess *proc, GAsyncResult *res, cairo_surface_t *thu char *path = path = stdout + end - 1; do { if (*path == '\n') { + path++; break; } --path;