From: Nishi Date: Thu, 17 Oct 2024 00:47:01 +0000 (+0000) Subject: fix path stuff X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=07fd24cb9bd997df1b77f38817d9a4ab829d9b59;p=tewi.git fix path stuff git-svn-id: file:///raid/svn-personal/tewi/trunk@364 8739d7e6-ffea-ec47-b151-bdff447c6205 --- diff --git a/Common/dir.c b/Common/dir.c index 77fef96..b50c757 100644 --- a/Common/dir.c +++ b/Common/dir.c @@ -69,7 +69,8 @@ char** cm_scandir(const char* path) { return r; #else - DIR* dir = opendir(path); + char* fxpath = cm_strcat(path, "/"); + DIR* dir = opendir(fxpath); if(dir != NULL) { char** r = malloc(sizeof(*r)); struct dirent* d; @@ -108,9 +109,11 @@ char** cm_scandir(const char* path) { free(old); closedir(dir); + free(fxpath); return r; } else { + free(fxpath); return NULL; } #endif diff --git a/Server/server.c b/Server/server.c index 7293090..8194936 100644 --- a/Server/server.c +++ b/Server/server.c @@ -973,6 +973,7 @@ cleanup: close_socket(sock); #if defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__) || defined(__WATCOMC__) #ifdef __NETWARE__ + ExitThread(EXIT_THREAD, 0); #elif defined(__DOS__) #else _endthread();