Index: trunk/src_plugins/export_svg/draw_svg.c =================================================================== --- trunk/src_plugins/export_svg/draw_svg.c (revision 36286) +++ trunk/src_plugins/export_svg/draw_svg.c (revision 36287) @@ -204,7 +204,7 @@ } if (f == NULL) { - TODO("copy error print from ps"); + rnd_message(RND_MSG_ERROR, "rnd_svg_new_file(): failed to open %s: %s\n", fn, strerror(ern)); perror(fn); return -1; } Index: trunk/src_plugins/export_svg/svg.c =================================================================== --- trunk/src_plugins/export_svg/svg.c (revision 36286) +++ trunk/src_plugins/export_svg/svg.c (revision 36287) @@ -36,6 +36,7 @@ #include #include #include +#include #include #include @@ -232,13 +233,17 @@ pcb_cam_begin(PCB, &svg_cam, &xform, options[HA_cam].str, svg_attribute_list, NUM_OPTIONS, options); if (svg_cam.fn_template == NULL) { + const char *fn; + filename = options[HA_svgfile].str; if (!filename) filename = "pcb.svg"; - f = rnd_fopen_askovr(&PCB->hidlib, svg_cam.active ? svg_cam.fn : filename, "wb", NULL); + fn = svg_cam.active ? svg_cam.fn : filename; + f = rnd_fopen_askovr(&PCB->hidlib, fn, "wb", NULL); if (f == NULL) { - TODO("copy error handling from ps"); + int ern = errno; + rnd_message(RND_MSG_ERROR, "svg_do_export(): failed to open %s: %s\n", fn, strerror(ern)); perror(filename); return; }