int create_subdir(char *newdir, const size_t buf_len, const char *parent_dir, const char *subdir_name) {
    int n = snprintf(newdir, buf_len, "%s%c%s", parent_dir, separator, subdir_name);
    if (n < 0) {
        printf("Creating file name failed\n");
        return ERROR;
    }
    if ((size_t) n >= buf_len) {
        printf("File name too long: %s\n", newdir);
        return ERROR;
    }
    return make_directory(newdir);
}
int create_subdir(char *newdir, const size_t buf_len, const char *parent_dir, const char *subdir_name) {
    int n = snprintf(newdir, buf_len, "%s%c%s", parent_dir, separator, subdir_name);
    if (n < 0) {
        printf("Creating file name failed\n");
        return ERROR;
    }
    if ((size_t) n >= buf_len) {
        printf("File name too long: %s\n", newdir);
        return ERROR;
    }
    return make_directory(newdir);
}