소스 검색

Fix path for the generated picture and improve error message

Martijn Braam 4 년 전
부모
커밋
d140e44d73
2개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      main.c
  2. 1 0
      process_pipeline.c

+ 1 - 1
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);
 	}
 }
 

+ 1 - 0
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;