summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-08-14 20:24:31 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-08-14 20:24:31 +0300
commit5004a5850ffc5157661b331abb4649237c31efdb (patch)
treebb8a2547f83d56eaf3d2cae612844558f8db1950 /plugins
parentb244d1adc6c9a1b6991262b0ee2ee387e75a695b (diff)
fix for CreatePathToFileW prototype (missing const specifier)
Diffstat (limited to 'plugins')
-rwxr-xr-xplugins/Msg_Export/src/utils.cpp2
-rw-r--r--plugins/PluginUpdater/pu_stub/pu_stub.cpp8
-rw-r--r--plugins/PluginUpdater/src/Utils.cpp2
-rw-r--r--plugins/PluginUpdater/src/stdafx.h2
4 files changed, 7 insertions, 7 deletions
diff --git a/plugins/Msg_Export/src/utils.cpp b/plugins/Msg_Export/src/utils.cpp
index 87e4f7b980..27b12dd673 100755
--- a/plugins/Msg_Export/src/utils.cpp
+++ b/plugins/Msg_Export/src/utils.cpp
@@ -1053,7 +1053,7 @@ HANDLE openCreateFile(wstring sFilePath)
if (hFile == INVALID_HANDLE_VALUE) {
// this might be because the path isent created
// so we will try to create it
- if (!CreateDirectoryTreeW(sFilePath.c_str()))
+ if (!CreatePathToFileW(sFilePath.c_str()))
hFile = CreateFile(sFilePath.c_str(), GENERIC_WRITE | GENERIC_READ, FILE_SHARE_READ, nullptr, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, nullptr);
}
diff --git a/plugins/PluginUpdater/pu_stub/pu_stub.cpp b/plugins/PluginUpdater/pu_stub/pu_stub.cpp
index 2a42d51c4c..fb4cd24462 100644
--- a/plugins/PluginUpdater/pu_stub/pu_stub.cpp
+++ b/plugins/PluginUpdater/pu_stub/pu_stub.cpp
@@ -28,7 +28,7 @@ void log(const wchar_t *tszFormat, ...)
#endif
}
-int CreateDirectoryTreeW(const WCHAR* szDir)
+int CreateDirectoryTreeW(const wchar_t* szDir)
{
wchar_t szTestDir[MAX_PATH];
lstrcpynW(szTestDir, szDir, MAX_PATH);
@@ -37,7 +37,7 @@ int CreateDirectoryTreeW(const WCHAR* szDir)
if (dwAttributes != INVALID_FILE_ATTRIBUTES && (dwAttributes & FILE_ATTRIBUTE_DIRECTORY))
return 0;
- WCHAR *pszLastBackslash = wcsrchr(szTestDir, '\\');
+ wchar_t *pszLastBackslash = wcsrchr(szTestDir, '\\');
if (pszLastBackslash == nullptr)
return 0;
@@ -47,9 +47,9 @@ int CreateDirectoryTreeW(const WCHAR* szDir)
return (CreateDirectoryW(szTestDir, nullptr) == 0) ? GetLastError() : 0;
}
-void CreatePathToFileW(WCHAR* wszFilePath)
+void CreatePathToFileW(wchar_t *wszFilePath)
{
- WCHAR* pszLastBackslash = wcsrchr(wszFilePath, '\\');
+ wchar_t* pszLastBackslash = wcsrchr(wszFilePath, '\\');
if (pszLastBackslash == nullptr)
return;
diff --git a/plugins/PluginUpdater/src/Utils.cpp b/plugins/PluginUpdater/src/Utils.cpp
index bf96b77579..e0c47e2680 100644
--- a/plugins/PluginUpdater/src/Utils.cpp
+++ b/plugins/PluginUpdater/src/Utils.cpp
@@ -583,7 +583,7 @@ int SafeCreateDirectory(const wchar_t *pFolder)
return TransactPipe(4, pFolder, nullptr);
}
-int SafeCreateFilePath(wchar_t *pFolder)
+int SafeCreateFilePath(const wchar_t *pFolder)
{
if (hPipe == nullptr) {
CreatePathToFileW(pFolder);
diff --git a/plugins/PluginUpdater/src/stdafx.h b/plugins/PluginUpdater/src/stdafx.h
index 8e59245d55..b05403facf 100644
--- a/plugins/PluginUpdater/src/stdafx.h
+++ b/plugins/PluginUpdater/src/stdafx.h
@@ -249,6 +249,6 @@ int SafeCreateDirectory(const wchar_t *ptszDirName);
int SafeCopyFile(const wchar_t *ptszSrc, const wchar_t *ptszDst);
int SafeMoveFile(const wchar_t *ptszSrc, const wchar_t *ptszDst);
int SafeDeleteFile(const wchar_t *ptszSrc);
-int SafeCreateFilePath(wchar_t *pFolder);
+int SafeCreateFilePath(const wchar_t *pFolder);
char *StrToLower(char *str);