From ceef17e74188d499d3edef5f42dcb9269fffb664 Mon Sep 17 00:00:00 2001 From: Joshua Bell Date: Mon, 3 Oct 2022 21:15:08 -0700 Subject: [PATCH] Fix target directory creation when a root path is specified. Fixes #38 --- Src/os/os.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Src/os/os.c b/Src/os/os.c index b8b9252..2491915 100644 --- a/Src/os/os.c +++ b/Src/os/os.c @@ -41,6 +41,8 @@ int os_CreateDirectory(char *directory) char *dir_tokenize = strdup(directory); char *buffer = calloc(1, 1024); + if (dir_tokenize[0] == FOLDER_CHARACTER[0]) + strcat(buffer, FOLDER_CHARACTER); char *token = strtok(dir_tokenize, FOLDER_CHARACTER); while (token) {