summaryrefslogtreecommitdiff
path: root/plugins/HTTPServer/src/FileShareNode.cpp
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2014-06-14 22:35:16 +0000
committerKirill Volinsky <mataes2007@gmail.com>2014-06-14 22:35:16 +0000
commit3942df7207beeb9f2fc08a6deb1d375badbe066a (patch)
tree10cff5e3f6b525410e00207d05578b30025c7d9f /plugins/HTTPServer/src/FileShareNode.cpp
parentc5fb4140e75fe56e24caa98fda1f13b14955efe9 (diff)
plugin unicoded
git-svn-id: http://svn.miranda-ng.org/main/trunk@9488 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/HTTPServer/src/FileShareNode.cpp')
-rw-r--r--plugins/HTTPServer/src/FileShareNode.cpp25
1 files changed, 14 insertions, 11 deletions
diff --git a/plugins/HTTPServer/src/FileShareNode.cpp b/plugins/HTTPServer/src/FileShareNode.cpp
index a5b57ecc14..cb5c3144b9 100644
--- a/plugins/HTTPServer/src/FileShareNode.cpp
+++ b/plugins/HTTPServer/src/FileShareNode.cpp
@@ -124,7 +124,8 @@ DWORD CLShareUser::dwGetDownloadSpeed() {
// Developer : KN
/////////////////////////////////////////////////////////////////////
-CLFileShareNode::CLFileShareNode(char * pszSrvPath, char * pszRealPath) {
+CLFileShareNode::CLFileShareNode(TCHAR *pszSrvPath, TCHAR *pszRealPath)
+{
memset(&st, 0, sizeof(STFileShareInfo));
st.lStructSize = sizeof(STFileShareInfo);
pclNext = NULL;
@@ -195,7 +196,8 @@ CLFileShareNode::~CLFileShareNode() {
// Developer : KN
/////////////////////////////////////////////////////////////////////
-bool CLFileShareNode::bSetPaths(char * pszSrvPath, char * pszRealPath) {
+bool CLFileShareNode::bSetPaths(TCHAR *pszSrvPath, TCHAR *pszRealPath)
+{
/* This might be a problem !!
if( nDownloadsInProgress > 0 )
return false;
@@ -207,25 +209,25 @@ bool CLFileShareNode::bSetPaths(char * pszSrvPath, char * pszRealPath) {
delete [] st.pszSrvPath;
delete [] st.pszRealPath;
- st.dwMaxSrvPath = (int)strlen(pszSrvPath) + 1;
- st.pszSrvPath = new char[ st.dwMaxSrvPath ];
- strcpy(st.pszSrvPath, pszSrvPath);
+ st.dwMaxSrvPath = (int)_tcslen(pszSrvPath) + 1;
+ st.pszSrvPath = new TCHAR[st.dwMaxSrvPath];
+ _tcscpy(st.pszSrvPath, pszSrvPath);
- int nRealLen = (int)strlen(pszRealPath);
+ int nRealLen = (int)_tcslen(pszRealPath);
if (nRealLen <= 2 || !(pszRealPath[1] == ':' ||
(pszRealPath[0] == '\\' && pszRealPath[1] == '\\'))) {
// Relative path
// we will prepend plugin path to avoid problems
st.dwMaxRealPath = nPluginPathLen + nRealLen + 1;
- st.pszRealPath = new char[ st.dwMaxRealPath ];
- strcpy(st.pszRealPath, szPluginPath);
+ st.pszRealPath = new TCHAR[st.dwMaxRealPath];
+ _tcscpy(st.pszRealPath, szPluginPath);
pszOrigRealPath = &st.pszRealPath[nPluginPathLen];
} else {
st.dwMaxRealPath = nRealLen + 1;
- st.pszRealPath = new char[ st.dwMaxRealPath ];
+ st.pszRealPath = new TCHAR[st.dwMaxRealPath];
pszOrigRealPath = st.pszRealPath;
}
- strcpy(pszOrigRealPath, pszRealPath);
+ _tcscpy(pszOrigRealPath, pszRealPath);
return true;
}
@@ -242,7 +244,8 @@ bool CLFileShareNode::bSetPaths(char * pszSrvPath, char * pszRealPath) {
// Developer : KN
/////////////////////////////////////////////////////////////////////
-bool CLFileShareNode::bSetInfo(STFileShareInfo * pstInfo) {
+bool CLFileShareNode::bSetInfo(STFileShareInfo *pstInfo)
+{
if (! bSetPaths(pstInfo->pszSrvPath, pstInfo->pszRealPath))
return false;
if (pstInfo->nMaxDownloads < -1)