From 18540e71624543fd0181b764a6913aa6bf8eb75d Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 20 Jun 2012 08:05:51 +0000 Subject: more avatar fixes git-svn-id: http://svn.miranda-ng.org/main/trunk@498 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Twitter/utility.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'protocols/Twitter/utility.cpp') diff --git a/protocols/Twitter/utility.cpp b/protocols/Twitter/utility.cpp index 2f79a40e99..3b98944bba 100644 --- a/protocols/Twitter/utility.cpp +++ b/protocols/Twitter/utility.cpp @@ -173,7 +173,7 @@ int mir_twitter::WLOG(const char* first, const std::wstring last) return LOG(first, str1); } -bool save_url(HANDLE hNetlib,const std::string &url,const std::string &filename) +bool save_url(HANDLE hNetlib,const std::string &url,const std::tstring &filename) { NETLIBHTTPREQUEST req = {sizeof(req)}; NETLIBHTTPREQUEST *resp; @@ -189,12 +189,12 @@ bool save_url(HANDLE hNetlib,const std::string &url,const std::string &filename) if (resp->resultCode == 200) { // Create folder if necessary - std::string dir = filename.substr(0,filename.rfind('\\')); - if(_access(dir.c_str(),0)) - CallService(MS_UTILS_CREATEDIRTREE, 0, (LPARAM)dir.c_str()); + std::tstring dir = filename.substr(0,filename.rfind('\\')); + if( _taccess(dir.c_str(),0)) + CallService(MS_UTILS_CREATEDIRTREET, 0, (LPARAM)dir.c_str()); // Write to file - FILE *f = fopen(filename.c_str(),"wb"); + FILE *f = _tfopen(filename.c_str(), _T("wb")); fwrite(resp->pData,1,resp->dataLength,f); fclose(f); } -- cgit v1.2.3