summaryrefslogtreecommitdiff
path: root/plugins/PackUpdater/Src/Notifications.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/PackUpdater/Src/Notifications.cpp')
-rw-r--r--plugins/PackUpdater/Src/Notifications.cpp42
1 files changed, 21 insertions, 21 deletions
diff --git a/plugins/PackUpdater/Src/Notifications.cpp b/plugins/PackUpdater/Src/Notifications.cpp
index 656219ef27..bbd50f4347 100644
--- a/plugins/PackUpdater/Src/Notifications.cpp
+++ b/plugins/PackUpdater/Src/Notifications.cpp
@@ -349,33 +349,33 @@ INT_PTR CALLBACK DlgUpdate(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam
if (todo[i].enabled) {
switch (todo[i].FileType) {
case 1:
- mir_sntprintf(tszFileDest, _countof(tszFileDest), _T("%s\\Pack"), tszRoot);
+ mir_sntprintf(tszFileDest, _T("%s\\Pack"), tszRoot);
CreateDirectory(tszFileDest, NULL);
break;
case 2:
- mir_sntprintf(tszFileDest, _countof(tszFileDest), _T("%s\\Plugins"), tszRoot);
+ mir_sntprintf(tszFileDest, _T("%s\\Plugins"), tszRoot);
CreateDirectory(tszFileDest, NULL);
break;
case 3:
- mir_sntprintf(tszFileDest, _countof(tszFileDest), _T("%s\\Icons"), tszRoot);
+ mir_sntprintf(tszFileDest, _T("%s\\Icons"), tszRoot);
CreateDirectory(tszFileDest, NULL);
break;
case 4:
- mir_sntprintf(tszFileDest, _countof(tszFileDest), _T("%s\\Others"), tszRoot);
+ mir_sntprintf(tszFileDest, _T("%s\\Others"), tszRoot);
CreateDirectory(tszFileDest, NULL);
break;
case 5:
- mir_sntprintf(tszFileDest, _countof(tszFileDest), _T("%s\\Others"), tszRoot);
+ mir_sntprintf(tszFileDest, _T("%s\\Others"), tszRoot);
CreateDirectory(tszFileDest, NULL);
break;
default:
mir_tstrncpy(tszFileDest, tszRoot, _countof(tszFileDest));
break;
}
- mir_sntprintf(tszBuff, _countof(tszBuff), _T("%s\\Backups"), tszRoot);
+ mir_sntprintf(tszBuff, _T("%s\\Backups"), tszRoot);
CreateDirectory(tszBuff, NULL);
mir_tstrncpy(tszFileName, todo[i].File.tszDiskPath, _countof(tszFileName));
- mir_sntprintf(todo[i].File.tszDiskPath, _countof(todo[i].File.tszDiskPath), _T("%s\\%s"), tszFileDest, tszFileName);
+ mir_sntprintf(todo[i].File.tszDiskPath, _T("%s\\%s"), tszFileDest, tszFileName);
UpdatesCount++;
tszExt = &todo[i].File.tszDownloadURL[mir_tstrlen(todo[i].File.tszDownloadURL) - 5];
@@ -400,7 +400,7 @@ INT_PTR CALLBACK DlgUpdate(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam
}
}
mir_tstrncpy(todo[i].tszCurVer, todo[i].tszNewVer, _countof(todo[i].tszCurVer));
- mir_snprintf(szKey, _countof(szKey), "File_%d_CurrentVersion", todo[i].FileNum);
+ mir_snprintf(szKey, "File_%d_CurrentVersion", todo[i].FileNum);
db_set_ts(NULL, MODNAME, szKey, todo[i].tszCurVer);
arFileType.push_back(todo[i].FileType);
arFilePath.push_back(todo[i].File.tszDiskPath);
@@ -452,10 +452,10 @@ INT_PTR CALLBACK DlgUpdate(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam
case 2:
tszUtilRootPlug = Utils_ReplaceVarsT(_T("%miranda_path%\\Plugins"));
if (mir_tstrcmp(arAdvFolder[i].c_str(), _T("")) == 0)
- mir_sntprintf(tszFilePathDest, _countof(tszFilePathDest), _T("%s\\%s"), tszUtilRootPlug, arFileName[i].c_str());
+ mir_sntprintf(tszFilePathDest, _T("%s\\%s"), tszUtilRootPlug, arFileName[i].c_str());
else
- mir_sntprintf(tszFilePathDest, _countof(tszFilePathDest), _T("%s\\%s\\%s"), tszUtilRootPlug, arAdvFolder[i].c_str(), arFileName[i].c_str());
- mir_sntprintf(tszFilePathBack, _countof(tszFilePathBack), _T("%s\\Backups\\%s"), tszRoot, arFileName[i].c_str());
+ mir_sntprintf(tszFilePathDest, _T("%s\\%s\\%s"), tszUtilRootPlug, arAdvFolder[i].c_str(), arFileName[i].c_str());
+ mir_sntprintf(tszFilePathBack, _T("%s\\Backups\\%s"), tszRoot, arFileName[i].c_str());
MoveFile(tszFilePathDest, tszFilePathBack);
MoveFile(arFilePath[i].c_str(), tszFilePathDest);
mir_free(tszUtilRootPlug);
@@ -465,10 +465,10 @@ INT_PTR CALLBACK DlgUpdate(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam
case 3:
tszUtilRootIco = Utils_ReplaceVarsT(_T("%miranda_path%\\Icons"));
if (mir_tstrcmp(arAdvFolder[i].c_str(), _T("")) == 0)
- mir_sntprintf(tszFilePathDest, _countof(tszFilePathDest), _T("%s\\%s"), tszUtilRootIco, arFileName[i].c_str());
+ mir_sntprintf(tszFilePathDest, _T("%s\\%s"), tszUtilRootIco, arFileName[i].c_str());
else
- mir_sntprintf(tszFilePathDest, _countof(tszFilePathDest), _T("%s\\%s\\%s"), tszUtilRootIco, arAdvFolder[i].c_str(), arFileName[i].c_str());
- mir_sntprintf(tszFilePathBack, _countof(tszFilePathBack), _T("%s\\Backups\\%s"), tszRoot, arFileName[i].c_str());
+ mir_sntprintf(tszFilePathDest, _T("%s\\%s\\%s"), tszUtilRootIco, arAdvFolder[i].c_str(), arFileName[i].c_str());
+ mir_sntprintf(tszFilePathBack, _T("%s\\Backups\\%s"), tszRoot, arFileName[i].c_str());
MoveFile(tszFilePathDest, tszFilePathBack);
MoveFile(arFilePath[i].c_str(), tszFilePathDest);
mir_free(tszUtilRootIco);
@@ -478,10 +478,10 @@ INT_PTR CALLBACK DlgUpdate(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam
case 4:
tszUtilRoot = Utils_ReplaceVarsT(_T("%miranda_path%"));
if (mir_tstrcmp(arAdvFolder[i].c_str(), _T("")) == 0)
- mir_sntprintf(tszFilePathDest, _countof(tszFilePathDest), _T("%s\\%s"), tszUtilRoot, arFileName[i].c_str());
+ mir_sntprintf(tszFilePathDest, _T("%s\\%s"), tszUtilRoot, arFileName[i].c_str());
else
- mir_sntprintf(tszFilePathDest, _countof(tszFilePathDest), _T("%s\\%s\\%s"), tszUtilRoot, arAdvFolder[i].c_str(), arFileName[i].c_str());
- mir_sntprintf(tszFilePathBack, _countof(tszFilePathBack), _T("%s\\Backups\\%s"), tszRoot, arFileName[i].c_str());
+ mir_sntprintf(tszFilePathDest, _T("%s\\%s\\%s"), tszUtilRoot, arAdvFolder[i].c_str(), arFileName[i].c_str());
+ mir_sntprintf(tszFilePathBack, _T("%s\\Backups\\%s"), tszRoot, arFileName[i].c_str());
MoveFile(tszFilePathDest, tszFilePathBack);
MoveFile(arFilePath[i].c_str(), tszFilePathDest);
mir_free(tszUtilRoot);
@@ -491,10 +491,10 @@ INT_PTR CALLBACK DlgUpdate(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam
case 5:
tszUtilRoot = Utils_ReplaceVarsT(_T("%miranda_path%"));
if (mir_tstrcmp(arAdvFolder[i].c_str(), _T("")) == 0)
- mir_sntprintf(tszFilePathDest, _countof(tszFilePathDest), _T("%s\\%s"), tszUtilRoot, arFileName[i].c_str());
+ mir_sntprintf(tszFilePathDest, _T("%s\\%s"), tszUtilRoot, arFileName[i].c_str());
else
- mir_sntprintf(tszFilePathDest, _countof(tszFilePathDest), _T("%s\\%s\\%s"), tszUtilRoot, arAdvFolder[i].c_str(), arFileName[i].c_str());
- mir_sntprintf(tszFilePathBack, _countof(tszFilePathBack), _T("%s\\Backups\\%s"), tszRoot, arFileName[i].c_str());
+ mir_sntprintf(tszFilePathDest, _T("%s\\%s\\%s"), tszUtilRoot, arAdvFolder[i].c_str(), arFileName[i].c_str());
+ mir_sntprintf(tszFilePathBack, _T("%s\\Backups\\%s"), tszRoot, arFileName[i].c_str());
MoveFile(tszFilePathDest, tszFilePathBack);
MoveFile(arFilePath[i].c_str(), tszFilePathDest);
mir_free(tszUtilRoot);
@@ -505,7 +505,7 @@ INT_PTR CALLBACK DlgUpdate(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam
else { //reminder for not installed pack update
if (Reminder && (UpdatesCount == 1) && (arFileType[0] == 1))
db_set_b(NULL, MODNAME, "Reminder", 2);
- mir_sntprintf(tszBuff, _countof(tszBuff), TranslateT("You have chosen not to install the pack update immediately.\nYou can install it manually from this location:\n\n%s"), arFilePath[0].c_str());
+ mir_sntprintf(tszBuff, TranslateT("You have chosen not to install the pack update immediately.\nYou can install it manually from this location:\n\n%s"), arFilePath[0].c_str());
Title = TranslateT("Pack Updater");
Text = tszBuff;
if (ServiceExists(MS_POPUP_ADDPOPUPT) && db_get_b(NULL, "Popup", "ModuleIsEnabled", 1) && db_get_b(NULL, MODNAME, "Popups2", DEFAULT_POPUP_ENABLED)) {