diff options
author | Tobias Weimer <wishmaster51@googlemail.com> | 2015-05-23 13:43:42 +0000 |
---|---|---|
committer | Tobias Weimer <wishmaster51@googlemail.com> | 2015-05-23 13:43:42 +0000 |
commit | 29bf1ac3e69292a27a74add40ad2b969f299193c (patch) | |
tree | 31077eb1996bc5d7b97d08f7f6813bab17369609 /plugins | |
parent | 9a63478efeff19317700063f32a5eba9d1502938 (diff) |
PluginUpdater:
-Fixed checking updates
git-svn-id: http://svn.miranda-ng.org/main/trunk@13773 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/PluginUpdater/src/Common.h | 2 | ||||
-rw-r--r-- | plugins/PluginUpdater/src/DlgUpdate.cpp | 13 |
2 files changed, 9 insertions, 6 deletions
diff --git a/plugins/PluginUpdater/src/Common.h b/plugins/PluginUpdater/src/Common.h index db9a31d0a4..dd5291294f 100644 --- a/plugins/PluginUpdater/src/Common.h +++ b/plugins/PluginUpdater/src/Common.h @@ -167,7 +167,7 @@ struct ServListEntry m_name( mir_a2t(_name)),
m_crc(_crc)
{
- strncpy(m_szHash, _hash, sizeof(m_szHash)-1);
+ strncpy(m_szHash, _hash, sizeof(m_szHash));
}
~ServListEntry()
diff --git a/plugins/PluginUpdater/src/DlgUpdate.cpp b/plugins/PluginUpdater/src/DlgUpdate.cpp index 22048b325c..6ebafacb3e 100644 --- a/plugins/PluginUpdater/src/DlgUpdate.cpp +++ b/plugins/PluginUpdater/src/DlgUpdate.cpp @@ -637,7 +637,7 @@ static int ScanFolder(const TCHAR *tszFolder, size_t cbBaseLen, int level, const if (item == NULL) {
TCHAR *p = _tcsrchr(tszNewName, '.');
if (p[-1] != 'w' && p[-1] != 'W') {
- Netlib_LogfT(hNetlibUser, _T("File %s not found on server"), ffd.cFileName);
+ Netlib_LogfT(hNetlibUser, _T("File %s: Not found on server, skipping"), ffd.cFileName);
continue;
}
@@ -645,7 +645,7 @@ static int ScanFolder(const TCHAR *tszFolder, size_t cbBaseLen, int level, const int iPos = int(p - tszNewName) - 1;
strdel(p - 1, 1);
if ((item = hashes.find((ServListEntry*)&pName)) == NULL) {
- Netlib_LogfT(hNetlibUser, _T("File %s not found on server"), ffd.cFileName);
+ Netlib_LogfT(hNetlibUser, _T("File %s: Not found on server, skipping"), ffd.cFileName);
continue;
}
@@ -660,23 +660,26 @@ static int ScanFolder(const TCHAR *tszFolder, size_t cbBaseLen, int level, const CalculateModuleHash(tszBuf, szMyHash);
// hashes are the same, skipping
if (strcmp(szMyHash, item->m_szHash) == 0) {
- Netlib_LogfT(hNetlibUser, _T("File %s is already up-to-date"), ffd.cFileName);
+ Netlib_LogfT(hNetlibUser, _T("File %s: Already up-to-date, skipping"), ffd.cFileName);
continue;
}
+ else
+ Netlib_LogfT(hNetlibUser, _T("File %s: Update available"), ffd.cFileName);
}
__except (EXCEPTION_EXECUTE_HANDLER)
{
// smth went wrong, reload a file from scratch
}
}
+ else
+ Netlib_LogfT(hNetlibUser, _T("File %s: Forcing redownload"), ffd.cFileName);
ptszUrl = item->m_name;
MyCRC = item->m_crc;
- Netlib_LogfT(hNetlibUser, _T("Found update for %s"), ffd.cFileName);
}
else {
// file was marked for deletion, add it to the list anyway
- Netlib_LogfT(hNetlibUser, _T("File %s marked for deletion"), ffd.cFileName);
+ Netlib_LogfT(hNetlibUser, _T("File %s: Marked for deletion"), ffd.cFileName);
ptszUrl = _T("");
MyCRC = 0;
}
|