Ver Fonte

Close handle

Johan Mattsson há 2 anos atrás
pai
commit
b065238fe1
1 ficheiros alterados com 6 adições e 5 exclusões
  1. 6 5
      engine/source/platformWin32/winFileio.cc

+ 6 - 5
engine/source/platformWin32/winFileio.cc

@@ -981,7 +981,8 @@ bool Platform::hasSubDirectory(const char *pPath)
             continue;
             continue;
 
 
          Platform::clearExcludedDirectories();
          Platform::clearExcludedDirectories();
-
+         FindClose(handle);
+         
          return true;
          return true;
       }      
       }      
    }
    }
@@ -1003,10 +1004,10 @@ static bool recurseDumpDirectories(const char *basePath, const char *subPath, Ve
    // Compose our search string - Format : ([path]/[subpath]/*)
    // Compose our search string - Format : ([path]/[subpath]/*)
    //-----------------------------------------------------------------------------
    //-----------------------------------------------------------------------------
 
 
-   dsize_t trLen = basePath ? dStrlen(basePath) : 0;
-   dsize_t subtrLen = subPath ? dStrlen(subPath) : 0;
-   char trail = trLen > 0 ? basePath[trLen - 1] : '\0';
-   char subTrail = subtrLen > 0 ? subPath[subtrLen - 1] : '\0';
+   dsize_t trLen = basePath ? dStrlen(basePath) : 0;
+   dsize_t subtrLen = subPath ? dStrlen(subPath) : 0;
+   char trail = trLen > 0 ? basePath[trLen - 1] : '\0';
+   char subTrail = subtrLen > 0 ? subPath[subtrLen - 1] : '\0';
    char subLead = subtrLen > 0 ? subPath[0] : '\0';
    char subLead = subtrLen > 0 ? subPath[0] : '\0';
 
 
    if (trail == '/')
    if (trail == '/')