| 198 | */ |
| 199 | |
| 200 | bool |
| 201 | push_ignored_db_dir(char *path) |
| 202 | { |
| 203 | LEX_STRING *new_elt; |
| 204 | char *new_elt_buffer; |
| 205 | size_t path_len= strlen(path); |
| 206 | |
| 207 | if (!path_len || path_len >= FN_REFLEN) |
| 208 | return true; |
| 209 | |
| 210 | // No need to normalize, it's only a directory name, not a path. |
| 211 | if (!my_multi_malloc(0, |
| 212 | &new_elt, sizeof(LEX_STRING), |
| 213 | &new_elt_buffer, path_len + 1, |
| 214 | NullS)) |
| 215 | return true; |
| 216 | new_elt->str= new_elt_buffer; |
| 217 | memcpy(new_elt_buffer, path, path_len); |
| 218 | new_elt_buffer[path_len]= 0; |
| 219 | new_elt->length= path_len; |
| 220 | return insert_dynamic(&ignore_db_dirs_array, &new_elt); |
| 221 | } |
| 222 | |
| 223 | |
| 224 | /** |
nothing calls this directly
no test coverage detected