Index: export_openscad.c =================================================================== --- export_openscad.c (revision 25226) +++ export_openscad.c (revision 25227) @@ -310,7 +310,7 @@ if (!filename) filename = "pcb.openscad"; - f = pcb_fopen(filename, "wb"); + f = pcb_fopen(&PCB->hidlib, filename, "wb"); if (!f) { perror(filename); return; @@ -602,7 +602,7 @@ PCB_ACT_CONVARG(1, FGW_STR, scad_export_poly, name = argv[1].val.str); - f = pcb_fopen(name, "w"); + f = pcb_fopen(&PCB->hidlib, name, "w"); if (f == NULL) { pcb_message(PCB_MSG_ERROR, "Failed to open %s for writing\n", name); PCB_ACT_IRES(-1); Index: scad_models.c =================================================================== --- scad_models.c (revision 25226) +++ scad_models.c (revision 25227) @@ -33,7 +33,7 @@ if (!htsp_has(models, name)) { char buff[1024], *full_path; - fin = pcb_fopen_first(&conf_core.rc.library_search_paths, name, "r", &full_path, pcb_true); + fin = pcb_fopen_first(&PCB->hidlib, &conf_core.rc.library_search_paths, name, "r", &full_path, pcb_true); if (fin != NULL) { char *s, *safe_name = pcb_strdup(name);