OSDN Git Service

Add work around to vista explore crash.
[tortoisegit/TortoiseGitJp.git] / src / Git / Git.cpp
index febd592..3b9ad9a 100644 (file)
@@ -126,11 +126,32 @@ BOOL wgEnumFiles_safe(const char *pszProjectPath, const char *pszSubPath, unsign
                return FALSE;\r
 }\r
 \r
+BOOL CGit::IsVista()\r
+{\r
+       OSVERSIONINFO osvi;\r
+    BOOL bIsWindowsXPorLater;\r
+\r
+    ZeroMemory(&osvi, sizeof(OSVERSIONINFO));\r
+    osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);\r
+\r
+    GetVersionEx(&osvi);\r
+       \r
+       if(osvi.dwMajorVersion >= 6)\r
+               return TRUE;\r
+       else\r
+               return FALSE;\r
+}\r
+\r
 static void InitWinGitDll()\r
 {\r
        __try\r
        {\r
 \r
+               if( CGit::IsVista () )\r
+               {\r
+                       g_IsWingitDllload=FALSE;\r
+                       return;\r
+               }\r
                if ( !wgInit() )\r
                {\r
                                // TODO\r