- /* Happens on bb_make_directory(dirname("no_slashes"),...) */
- if (LONE_CHAR(path, '.'))
+ /* "path" can be a result of dirname().
+ * dirname("no_slashes") returns ".", possibly read-only.
+ * musl dirname() can return read-only "/" too.
+ * We need writable string. And for "/", "." (and ".."?)
+ * nothing needs to be created anyway.
+ */
+ if (LONE_CHAR(path, '/'))