Skip to content
Snippets Groups Projects
Commit 2e5ccab5 authored by Guillem Bartrina's avatar Guillem Bartrina
Browse files

fix wrong initalized env for [ab] that prevented them from using filesystem utilities

parent cfb49499
No related branches found
No related tags found
4 merge requests!5752.15.0 release candidate,!574Draft: 2.15.0 release candidate,!560feature - private abstractions [ab],!483WIP: private patch abstractions [ab]. first approach
...@@ -1927,10 +1927,11 @@ static char ab_templatecanvas[] = "#N canvas;\n"; ...@@ -1927,10 +1927,11 @@ static char ab_templatecanvas[] = "#N canvas;\n";
/* create an ab instance from its source */ /* create an ab instance from its source */
static t_pd *do_create_ab(t_ab_definition *abdef, int argc, t_atom *argv) static t_pd *do_create_ab(t_ab_definition *abdef, int argc, t_atom *argv)
{ {
canvas_setargs(argc, argv); canvas_setargs(argc, argv);
int dspstate = canvas_suspend_dsp(); int dspstate = canvas_suspend_dsp();
glob_setfilename(0, abdef->ad_name, gensym("[ab]")); char filename[MAXPDSTRING];
sprintf(filename, "[ab] %s", abdef->ad_name->s_name);
glob_setfilename(0, gensym(filename), canvas_getdir(canvas_getcurrent()));
canvas_setabsource(abdef); // set the ab source canvas_setabsource(abdef); // set the ab source
binbuf_eval(abdef->ad_source, 0, 0, 0); binbuf_eval(abdef->ad_source, 0, 0, 0);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment