OSDN Git Service

give up save cache when m_GitDir is empty
authorFrank Li <lznuaa@gmail.com>
Mon, 18 Jan 2010 05:59:12 +0000 (13:59 +0800)
committerFrank Li <lznuaa@gmail.com>
Mon, 18 Jan 2010 05:59:12 +0000 (13:59 +0800)
Signed-off-by: Frank Li <lznuaa@gmail.com>
src/TortoiseProc/GitLogCache.cpp

index 7028d06..0ba88b9 100644 (file)
@@ -231,6 +231,9 @@ int CLogCache::SaveCache()
        if( this->m_HashMap.size() == 0 )\r
                return 0;\r
 \r
        if( this->m_HashMap.size() == 0 )\r
                return 0;\r
 \r
+       if( this->m_GitDir.IsEmpty())\r
+               return 0;\r
+\r
        bool bIsRebuild=false;\r
        if(this->m_DataFile.m_hFile != CFile::hFileNull)\r
                m_DataFile.Close();\r
        bool bIsRebuild=false;\r
        if(this->m_DataFile.m_hFile != CFile::hFileNull)\r
                m_DataFile.Close();\r