From 9fc659b652a43dfc7e13dcd014754a0549cf1d7e Mon Sep 17 00:00:00 2001 From: NishiOwO Date: Sat, 4 Apr 2026 00:38:18 +0900 Subject: [PATCH] some code does this --- src/abstract/directory.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/abstract/directory.c b/src/abstract/directory.c index 068e566..c7316b8 100644 --- a/src/abstract/directory.c +++ b/src/abstract/directory.c @@ -18,7 +18,12 @@ void* MwDirectoryOpen(const char* path) { #ifdef _WIN32 char* p = malloc(strlen(path) + 2 + 1); strcpy(p, path); - strcat(p, "/*"); + if(strchr(path, '/') != NULL){ + strcat(p, "/"); + }else{ + strcat(p, "\\"); + } + strcat(p, "*"); if((dir->hFind = FindFirstFile(p, &dir->ffd)) == INVALID_HANDLE_VALUE) { free(p); free(dir);