From e168f0fd501b8d6079dfd3610078dba6c4240814 Mon Sep 17 00:00:00 2001 From: upstream svn Date: Sun, 15 May 2011 11:26:48 +0000 Subject: [PATCH] Use consistent extension ".bak" for backup files (solving issue #1667) --- .svn-revision | 2 +- src/ClientCreditsList.cpp | 2 +- src/PartFile.cpp | 2 +- src/ServerList.cpp | 7 ++++++- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.svn-revision b/.svn-revision index c06c722d..f6a15fb2 100644 --- a/.svn-revision +++ b/.svn-revision @@ -1 +1 @@ -10566 +10567 diff --git a/src/ClientCreditsList.cpp b/src/ClientCreditsList.cpp index 3322b240..eba19a65 100644 --- a/src/ClientCreditsList.cpp +++ b/src/ClientCreditsList.cpp @@ -42,7 +42,7 @@ #define CLIENTS_MET_FILENAME wxT("clients.met") -#define CLIENTS_MET_BAK_FILENAME wxT("clients.met.BAK") +#define CLIENTS_MET_BAK_FILENAME wxT("clients.met.bak") #define CRYPTKEY_FILENAME wxT("cryptkey.dat") diff --git a/src/PartFile.cpp b/src/PartFile.cpp index ca4daeda..6e03370c 100644 --- a/src/PartFile.cpp +++ b/src/PartFile.cpp @@ -2266,7 +2266,7 @@ void CPartFile::Delete() if (!CPath::RemoveFile(BAKName)) { AddDebugLogLineC(logPartFile, CFormat(wxT("Failed to delete '%s'")) % BAKName); } else { - AddDebugLogLineN(logPartFile, wxT("\tRemoved .BAK")); + AddDebugLogLineN(logPartFile, wxT("\tRemoved .bak")); } CPath SEEDSName = m_fullname.AppendExt(wxT(".seeds")); diff --git a/src/ServerList.cpp b/src/ServerList.cpp index da50a1bb..699202d0 100644 --- a/src/ServerList.cpp +++ b/src/ServerList.cpp @@ -802,12 +802,17 @@ bool CServerList::SaveServerMet() servermet.Close(); const CPath curservermet = CPath(theApp->ConfigDir + wxT("server.met")); - const CPath oldservermet = CPath(theApp->ConfigDir + wxT("server_met.old")); + const CPath oldservermet = CPath(theApp->ConfigDir + wxT("server.met.bak")); + const CPath obsoleteservermet = CPath(theApp->ConfigDir + wxT("server_met.old")); if (oldservermet.FileExists()) { CPath::RemoveFile(oldservermet); } + if (obsoleteservermet.FileExists()) { + CPath::RemoveFile(obsoleteservermet); + } + if (curservermet.FileExists()) { CPath::RenameFile(curservermet, oldservermet); } -- 2.11.4.GIT