Make all workspaces starting with "__" internal
Workspaces won't work properly if they start with "__", so reserve that namespace altogether. Disallow renaming workspaces to reserved namespace and using reserved namespace in configuration. Fixes #1209.
This commit is contained in:
committed by
Michael Stapelberg
parent
144e3fba2a
commit
bc79884a9e
@ -142,6 +142,10 @@ Con *create_workspace_on_output(Output *output, Con *content) {
|
||||
continue;
|
||||
if (*target == '"')
|
||||
target++;
|
||||
if (strncasecmp(target, "__", strlen("__")) == 0) {
|
||||
LOG("Cannot create workspace. '__' is a reserved prefix.\n");
|
||||
continue;
|
||||
}
|
||||
FREE(ws->name);
|
||||
ws->name = strdup(target);
|
||||
if (ws->name[strlen(ws->name)-1] == '"')
|
||||
|
Reference in New Issue
Block a user