Bugfix: Correctly check if the workspace already exists
This commit is contained in:
parent
3e077a0a31
commit
9800d5286f
|
@ -387,6 +387,7 @@ void init_ws_for_output(Output *output, Con *content) {
|
||||||
ws->name[strlen(ws->name)-1] = '\0';
|
ws->name[strlen(ws->name)-1] = '\0';
|
||||||
DLOG("trying name *%s*\n", ws->name);
|
DLOG("trying name *%s*\n", ws->name);
|
||||||
|
|
||||||
|
current = NULL;
|
||||||
TAILQ_FOREACH(out, &(croot->nodes_head), nodes)
|
TAILQ_FOREACH(out, &(croot->nodes_head), nodes)
|
||||||
GREP_FIRST(current, output_get_content(out), !strcasecmp(child->name, ws->name));
|
GREP_FIRST(current, output_get_content(out), !strcasecmp(child->name, ws->name));
|
||||||
|
|
||||||
|
@ -404,6 +405,7 @@ void init_ws_for_output(Output *output, Con *content) {
|
||||||
FREE(ws->name);
|
FREE(ws->name);
|
||||||
asprintf(&(ws->name), "%d", c);
|
asprintf(&(ws->name), "%d", c);
|
||||||
|
|
||||||
|
current = NULL;
|
||||||
TAILQ_FOREACH(out, &(croot->nodes_head), nodes)
|
TAILQ_FOREACH(out, &(croot->nodes_head), nodes)
|
||||||
GREP_FIRST(current, output_get_content(out), !strcasecmp(child->name, ws->name));
|
GREP_FIRST(current, output_get_content(out), !strcasecmp(child->name, ws->name));
|
||||||
exists = (current != NULL);
|
exists = (current != NULL);
|
||||||
|
|
Loading…
Reference in New Issue