Fix path for the generated picture and improve error message
This commit is contained in:
2
main.c
2
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);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -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;
|
||||
|
Reference in New Issue
Block a user