fix: createDirRecursively won't create last level directory if dir is not ended with '/'

This commit is contained in:
Paul Pan 2024-03-14 23:39:17 +08:00
parent d7e29edd02
commit 8a6183e470

View File

@ -131,7 +131,7 @@ bool createDirRecursively(const char* dir) {
}
char path[PATH_MAX];
snprintf(path, sizeof(path), "%s", dir);
snprintf(path, sizeof(path), "%s/", dir);
char* curr = path;
for (;;) {
while (*curr == '/') {