OSDN Git Service

Workaround Issue 73: Error while reading/writing the registry key MSysGit Access...
authorFrank Li <lznuaa@gmail.com>
Fri, 1 May 2009 13:58:36 +0000 (21:58 +0800)
committerFrank Li <lznuaa@gmail.com>
Fri, 1 May 2009 13:58:36 +0000 (21:58 +0800)
Don't use current user replace local machine to save msysgit path

src/Git/Git.cpp
src/Resources/TortoiseProcENG.rc
src/TortoiseProc/Settings/SetMainPage.cpp
src/TortoiseProc/resource.h

index b1eefc7..49a5059 100644 (file)
@@ -801,7 +801,7 @@ BOOL CGit::CheckMsysGitDir()
 \r
        // add git/bin path to PATH\r
 \r
 \r
        // add git/bin path to PATH\r
 \r
-       CRegString msysdir=CRegString(REG_MSYSGIT_PATH,_T(""),FALSE,HKEY_LOCAL_MACHINE);\r
+       CRegString msysdir=CRegString(REG_MSYSGIT_PATH,_T(""),FALSE);\r
        CString str=msysdir;\r
        if(str.IsEmpty())\r
        {\r
        CString str=msysdir;\r
        if(str.IsEmpty())\r
        {\r
index ee18c64..d9cfc15 100644 (file)
Binary files a/src/Resources/TortoiseProcENG.rc and b/src/Resources/TortoiseProcENG.rc differ
index a8e9e1c..96f4a43 100644 (file)
@@ -43,7 +43,7 @@ CSetMainPage::CSetMainPage()
        CString temp=CRegString(REG_MSYSGIT_INSTALL,_T(""),FALSE,HKEY_LOCAL_MACHINE);;\r
        if(!temp.IsEmpty())\r
                temp+=_T("bin");\r
        CString temp=CRegString(REG_MSYSGIT_INSTALL,_T(""),FALSE,HKEY_LOCAL_MACHINE);;\r
        if(!temp.IsEmpty())\r
                temp+=_T("bin");\r
-       m_regMsysGitPath = CRegString(REG_MSYSGIT_PATH,temp,FALSE,HKEY_LOCAL_MACHINE);\r
+       m_regMsysGitPath = CRegString(REG_MSYSGIT_PATH,temp,FALSE);\r
        m_regCheckNewer = CRegDWORD(_T("Software\\TortoiseGit\\CheckNewer"), TRUE);\r
        m_regLastCommitTime = CRegString(_T("Software\\Tigris.org\\Subversion\\Config\\miscellany\\use-commit-times"), _T(""));\r
        if ((GetEnvironmentVariable(_T("SVN_ASP_DOT_NET_HACK"), NULL, 0)==0)&&(GetLastError()==ERROR_ENVVAR_NOT_FOUND))\r
        m_regCheckNewer = CRegDWORD(_T("Software\\TortoiseGit\\CheckNewer"), TRUE);\r
        m_regLastCommitTime = CRegString(_T("Software\\Tigris.org\\Subversion\\Config\\miscellany\\use-commit-times"), _T(""));\r
        if ((GetEnvironmentVariable(_T("SVN_ASP_DOT_NET_HACK"), NULL, 0)==0)&&(GetLastError()==ERROR_ENVVAR_NOT_FOUND))\r
index 53aff06..c7e3209 100644 (file)
Binary files a/src/TortoiseProc/resource.h and b/src/TortoiseProc/resource.h differ