X-Git-Url: http://Server1/repobrowser/?a=blobdiff_plain;f=source%2Fcommon%2Fetag.cpp;h=a2d298d48950235028e4af81720fd8c788d6208a;hb=ee9b71949005734012f18251774807c38b989ae2;hp=6e24d0142418e7049ca277363fb59d143cb692f7;hpb=472ba57cddb0937ac20b81542411374401ddc1ec;p=xestiaab%2F.git diff --git a/source/common/etag.cpp b/source/common/etag.cpp index 6e24d01..a2d298d 100644 --- a/source/common/etag.cpp +++ b/source/common/etag.cpp @@ -180,9 +180,7 @@ wxString ETagDB::GetETag(wxString Filename){ ProcessLock->lock(); // Get the ETag. - - //IterwxS = FilenameETag.find(Filename); - + if (FilenameETag.find(Filename) != FilenameETag.end()){ IterwxS = FilenameETag.find(Filename); @@ -212,8 +210,6 @@ wxString ETagDB::GetETagOriginal(wxString Filename){ // Get the ETag. - //IterwxS = FilenameETag.find(Filename); - if (FilenameETagOriginal.find(Filename) != FilenameETagOriginal.end()){ IterwxS = FilenameETagOriginal.find(Filename); @@ -270,7 +266,7 @@ bool ETagDB::WriteETagDB(){ if (wxFileExists(AccountETagDB) == FALSE){ if (ETagDBFile.Create(AccountETagDB) == FALSE){ - ////ProcessLock.unlock(); + return FALSE; } @@ -278,7 +274,7 @@ bool ETagDB::WriteETagDB(){ } else { if (ETagDBFile.Open(AccountETagDB) == FALSE){ - ////ProcessLock.unlock(); + return FALSE; } @@ -298,7 +294,19 @@ bool ETagDB::WriteETagDB(){ continue; } - SettingLine = iter->first + wxT("|") + iter->second + wxT("|") + IterwxS->second; + wxString ServerETag = ""; + + if (IterwxS == FilenameETagOriginal.end()) { + + ServerETag = ""; + + } else { + + ServerETag = IterwxS->second; + + } + + SettingLine = iter->first + wxT("|") + iter->second + wxT("|") + ServerETag; ETagDBFile.InsertLine(SettingLine, LineSeek); @@ -332,9 +340,7 @@ bool ETagDB::LoadETagDB(){ wxString AccountDirPath; #if defined(__HAIKU__) - - //preffilename = wxT("noo"); - + #elif defined(__WIN32__) AccountDirPath = GetAccountDir(AccountDir, FALSE); @@ -356,8 +362,6 @@ bool ETagDB::LoadETagDB(){ if (wxFileExists(AccountETagDB) == FALSE){ if (ETagDBFile.Create(AccountETagDB) == FALSE){ - ////ProcessLock.unlock(); - //ProcessLock->unlock(); return FALSE; @@ -367,8 +371,6 @@ bool ETagDB::LoadETagDB(){ if (ETagDBFile.Open(AccountETagDB, wxConvUTF8) == FALSE){ - ////ProcessLock.unlock(); - //ProcessLock->unlock(); return FALSE; }