OSDN Git Service

Fix TortoiseGitBlame miss GitLogCache problem.
authorFrank Li <lznuaa@gmail.com>
Thu, 29 Jan 2009 13:16:11 +0000 (21:16 +0800)
committerFrank Li <lznuaa@gmail.com>
Thu, 29 Jan 2009 13:16:11 +0000 (21:16 +0800)
Fix save cache fail when close TortoiseGitBlame.

Signed-off-by: Frank Li <lznuaa@gmail.com>
src/TortoiseGitBlame/TortoiseGitBlame.vcproj
src/TortoiseProc/GitLogCache.cpp

index 2be27be..03c18b0 100644 (file)
                                >\r
                        </File>\r
                        <File\r
                                >\r
                        </File>\r
                        <File\r
+                               RelativePath="..\TortoiseProc\GitLogCache.cpp"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\TortoiseProc\gitlogcache.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
                                RelativePath="..\TortoiseProc\GitLogListBase.cpp"\r
                                >\r
                        </File>\r
                                RelativePath="..\TortoiseProc\GitLogListBase.cpp"\r
                                >\r
                        </File>\r
                                >\r
                        </File>\r
                        <File\r
                                >\r
                        </File>\r
                        <File\r
-                               RelativePath=".\res\output_wnd.ico"\r
+                               RelativePath="..\Resources\blameres\output_wnd.ico"\r
                                >\r
                        </File>\r
                        <File\r
                                >\r
                        </File>\r
                        <File\r
-                               RelativePath="..\Resources\blameres\output_wnd.ico"\r
+                               RelativePath=".\res\output_wnd.ico"\r
                                >\r
                        </File>\r
                        <File\r
                                >\r
                        </File>\r
                        <File\r
-                               RelativePath=".\res\output_wnd_hc.ico"\r
+                               RelativePath="..\Resources\blameres\output_wnd_hc.ico"\r
                                >\r
                        </File>\r
                        <File\r
                                >\r
                        </File>\r
                        <File\r
-                               RelativePath="..\Resources\blameres\output_wnd_hc.ico"\r
+                               RelativePath=".\res\output_wnd_hc.ico"\r
                                >\r
                        </File>\r
                        <File\r
                                >\r
                        </File>\r
                        <File\r
                                >\r
                        </File>\r
                        <File\r
                                >\r
                        </File>\r
                        <File\r
-                               RelativePath="..\Resources\blameres\properties_hc.bmp"\r
+                               RelativePath=".\res\properties_hc.bmp"\r
                                >\r
                        </File>\r
                        <File\r
                                >\r
                        </File>\r
                        <File\r
-                               RelativePath=".\res\properties_hc.bmp"\r
+                               RelativePath="..\Resources\blameres\properties_hc.bmp"\r
                                >\r
                        </File>\r
                        <File\r
                                >\r
                        </File>\r
                        <File\r
-                               RelativePath="..\Resources\blameres\properties_wnd.ico"\r
+                               RelativePath=".\res\properties_wnd.ico"\r
                                >\r
                        </File>\r
                        <File\r
                                >\r
                        </File>\r
                        <File\r
-                               RelativePath=".\res\properties_wnd.ico"\r
+                               RelativePath="..\Resources\blameres\properties_wnd.ico"\r
                                >\r
                        </File>\r
                        <File\r
                                >\r
                        </File>\r
                        <File\r
                                >\r
                        </File>\r
                        <File\r
                                >\r
                        </File>\r
                        <File\r
-                               RelativePath="..\Resources\blameres\Toolbar.bmp"\r
+                               RelativePath=".\res\Toolbar.bmp"\r
                                >\r
                        </File>\r
                        <File\r
                                >\r
                        </File>\r
                        <File\r
-                               RelativePath=".\res\Toolbar.bmp"\r
+                               RelativePath="..\Resources\blameres\Toolbar.bmp"\r
                                >\r
                        </File>\r
                        <File\r
                                >\r
                        </File>\r
                        <File\r
-                               RelativePath="..\Resources\blameres\Toolbar256.bmp"\r
+                               RelativePath=".\res\Toolbar256.bmp"\r
                                >\r
                        </File>\r
                        <File\r
                                >\r
                        </File>\r
                        <File\r
-                               RelativePath=".\res\Toolbar256.bmp"\r
+                               RelativePath="..\Resources\blameres\Toolbar256.bmp"\r
                                >\r
                        </File>\r
                        <File\r
                                >\r
                        </File>\r
                        <File\r
                                </FileConfiguration>\r
                        </File>\r
                        <File\r
                                </FileConfiguration>\r
                        </File>\r
                        <File\r
-                               RelativePath="..\Resources\blameres\TortoiseGitBlameDoc.ico"\r
+                               RelativePath=".\res\TortoiseGitBlameDoc.ico"\r
                                >\r
                        </File>\r
                        <File\r
                                >\r
                        </File>\r
                        <File\r
-                               RelativePath=".\res\TortoiseGitBlameDoc.ico"\r
+                               RelativePath="..\Resources\blameres\TortoiseGitBlameDoc.ico"\r
                                >\r
                        </File>\r
                        <File\r
                                >\r
                        </File>\r
                        <File\r
index 0e022ae..82caa0c 100644 (file)
@@ -223,6 +223,9 @@ int CLogCache::RebuildCacheFile()
 }\r
 int CLogCache::SaveCache()\r
 {\r
 }\r
 int CLogCache::SaveCache()\r
 {\r
+       if( this->m_NewCacheEntry.size() == 0 )\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