diff options
Diffstat (limited to 'plugins/PluginUpdater/src/Utils.cpp')
| -rw-r--r-- | plugins/PluginUpdater/src/Utils.cpp | 12 | 
1 files changed, 6 insertions, 6 deletions
diff --git a/plugins/PluginUpdater/src/Utils.cpp b/plugins/PluginUpdater/src/Utils.cpp index 8b983b49da..30f212abe1 100644 --- a/plugins/PluginUpdater/src/Utils.cpp +++ b/plugins/PluginUpdater/src/Utils.cpp @@ -151,8 +151,8 @@ bool ParseHashes(const TCHAR *ptszUrl, ptrT &baseUrl, SERVLIST &arHashes)  	// Download version info
  	FILEURL pFileUrl;
 -	mir_sntprintf(pFileUrl.tszDownloadURL, _countof(pFileUrl.tszDownloadURL), _T("%s/hashes.zip"), baseUrl);
 -	mir_sntprintf(pFileUrl.tszDiskPath, _countof(pFileUrl.tszDiskPath), _T("%s\\hashes.zip"), g_tszTempPath);
 +	mir_sntprintf(pFileUrl.tszDownloadURL, _T("%s/hashes.zip"), baseUrl);
 +	mir_sntprintf(pFileUrl.tszDiskPath, _T("%s\\hashes.zip"), g_tszTempPath);
  	pFileUrl.CRCsum = 0;
  	HANDLE nlc;
 @@ -176,7 +176,7 @@ bool ParseHashes(const TCHAR *ptszUrl, ptrT &baseUrl, SERVLIST &arHashes)  	DeleteFile(pFileUrl.tszDiskPath);
  	TCHAR tszTmpIni[MAX_PATH] = {0};
 -	mir_sntprintf(tszTmpIni, _countof(tszTmpIni), _T("%s\\hashes.txt"), g_tszTempPath);
 +	mir_sntprintf(tszTmpIni, _T("%s\\hashes.txt"), g_tszTempPath);
  	FILE *fp = _tfopen(tszTmpIni, _T("r"));
  	if (!fp) {
  		Netlib_LogfT(hNetlibUser,_T("Opening %s failed"), g_tszTempPath);
 @@ -284,7 +284,7 @@ bool DownloadFile(FILEURL *pFileURL, HANDLE &nlc)  				else {
  					// try to write it via PU stub
  					TCHAR tszTempFile[MAX_PATH];
 -					mir_sntprintf(tszTempFile, _countof(tszTempFile), _T("%s\\pulocal.tmp"), g_tszTempPath);
 +					mir_sntprintf(tszTempFile, _T("%s\\pulocal.tmp"), g_tszTempPath);
  					hFile = CreateFile(tszTempFile, GENERIC_READ | GENERIC_WRITE, NULL, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
  					if (hFile != INVALID_HANDLE_VALUE) {
  						DWORD dwBytes;
 @@ -510,7 +510,7 @@ bool PrepareEscalation()  	else {
  		// Elevate the process. Create a pipe for a stub first
  		TCHAR tszPipeName[MAX_PATH];
 -		mir_sntprintf(tszPipeName, _countof(tszPipeName), _T("\\\\.\\pipe\\Miranda_Pu_%d"), GetCurrentProcessId());
 +		mir_sntprintf(tszPipeName, _T("\\\\.\\pipe\\Miranda_Pu_%d"), GetCurrentProcessId());
  		hPipe = CreateNamedPipe(tszPipeName, PIPE_ACCESS_DUPLEX, PIPE_READMODE_BYTE | PIPE_WAIT, 1, 1024, 1024, NMPWAIT_USE_DEFAULT_WAIT, NULL);
  		if (hPipe == INVALID_HANDLE_VALUE) {
  			hPipe = NULL;
 @@ -520,7 +520,7 @@ bool PrepareEscalation()  			GetModuleFileName(NULL, szPath, ARRAYSIZE(szPath));
  			if ((p = _tcsrchr(szPath, '\\')) != 0)
  				_tcscpy(p+1, _T("pu_stub.exe"));
 -			mir_sntprintf(cmdLine, _countof(cmdLine), _T("%d"), GetCurrentProcessId());
 +			mir_sntprintf(cmdLine, _T("%d"), GetCurrentProcessId());
  			// Launch a stub
  			SHELLEXECUTEINFO sei = { sizeof(sei) };
  | 
