]> Nishi Git Mirror - tewi.git/commitdiff
fix path stuff
authorNishi <nishi@nishi.boats>
Thu, 17 Oct 2024 00:47:01 +0000 (00:47 +0000)
committerNishi <nishi@nishi.boats>
Thu, 17 Oct 2024 00:47:01 +0000 (00:47 +0000)
git-svn-id: file:///raid/svn-personal/tewi/trunk@364 8739d7e6-ffea-ec47-b151-bdff447c6205

Common/dir.c
Server/server.c

index 77fef96d77f391096c4987d45c6e4635e34ef88e..b50c757c786af42862736f20ed08dfde582d2413 100644 (file)
@@ -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
index 72930904b07568af6648abdc4ea3f40573a1db23..8194936ff7029265ab992e569eb8d82d51cbd953 100644 (file)
@@ -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();