48 char *buffer = strdup(newdir);
50 int len = strlen(buffer);
56 if (buffer[len - 1] ==
'/') {
57 buffer[len - 1] =
'\0';
59 if (mkdir(buffer, 0755) == 0) {
68 while (*p && *p !=
'\\' && *p !=
'/')
72 if ((mkdir(buffer, 0755) == -1) && (errno == ENOENT)) {
73 fprintf(stderr,
"Couldn't create directory %s\n", buffer);