summaryrefslogtreecommitdiff
path: root/protocols/Twitter/src/utility.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2016-07-26 09:20:25 +0000
committerGeorge Hazan <george.hazan@gmail.com>2016-07-26 09:20:25 +0000
commit6e53dfca72b932c4bdcd7aa02ca62bf8b2630eac (patch)
tree2e8bb660c908b54914abd562af8aafa4a486c846 /protocols/Twitter/src/utility.cpp
parenta61c8728b379057fe7f0a0d86fe0b037598229dd (diff)
less TCHARs:
- TCHAR is replaced with wchar_t everywhere; - LPGENT replaced with either LPGENW or LPGEN; - fixes for ANSI plugins that improperly used _t functions; - TCHAR *t removed from MAllStrings; - ptszGroup, ptszTitle & ptszTab in OPTIONSDIALOGPAGE replaced with pwsz* git-svn-id: http://svn.miranda-ng.org/main/trunk@17133 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Twitter/src/utility.cpp')
-rw-r--r--protocols/Twitter/src/utility.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/protocols/Twitter/src/utility.cpp b/protocols/Twitter/src/utility.cpp
index e8056e02a8..565ef3622b 100644
--- a/protocols/Twitter/src/utility.cpp
+++ b/protocols/Twitter/src/utility.cpp
@@ -130,7 +130,7 @@ http::response mir_twitter::slurp(const std::string &url, http::method meth, OAu
return resp_data;
}
-bool save_url(HANDLE hNetlib, const std::string &url, const std::tstring &filename)
+bool save_url(HANDLE hNetlib, const std::string &url, const std::wstring &filename)
{
NETLIBHTTPREQUEST req = { sizeof(req) };
req.requestType = REQUEST_GET;
@@ -144,12 +144,12 @@ bool save_url(HANDLE hNetlib, const std::string &url, const std::tstring &filena
bool success = (resp->resultCode == 200);
if (success) {
// Create folder if necessary
- std::tstring dir = filename.substr(0, filename.rfind('\\'));
- if (_taccess(dir.c_str(), 0))
+ std::wstring dir = filename.substr(0, filename.rfind('\\'));
+ if (_waccess(dir.c_str(), 0))
CreateDirectoryTreeT(dir.c_str());
// Write to file
- FILE *f = _tfopen(filename.c_str(), L"wb");
+ FILE *f = _wfopen(filename.c_str(), L"wb");
fwrite(resp->pData, 1, resp->dataLength, f);
fclose(f);
}