fix: bring project back to a working state

This commit is contained in:
Theo Tappe
2026-07-04 17:55:03 +02:00
parent 75d5f91c6a
commit 4d6171d6bf
17 changed files with 315 additions and 226 deletions
+6 -1
View File
@@ -10,9 +10,14 @@ void mkdir_r(char *path) {
strcpy(path_duplicate, path);
char *path_current = (char *)malloc((strlen(path) + 2) * sizeof(char));
char *path_current_position = path_current;
if (path[0] == '/') {
strcpy(path_current, "/");
path_current_position += 1;
} else {
path_current[0] = '\0';
}
const char *delimiter = "/";
char *part = strtok(path_duplicate, delimiter);
// struct stat st;
while (part != NULL) {
strcpy(path_current_position, part);
path_current_position += strlen(part) * sizeof(char);