diff options
author | George Hazan <george.hazan@gmail.com> | 2012-06-20 08:05:51 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-06-20 08:05:51 +0000 |
commit | 18540e71624543fd0181b764a6913aa6bf8eb75d (patch) | |
tree | 2fc7dc37339a353b53cbe878138ffd69227accfb /protocols/Twitter/utility.cpp | |
parent | a00d983ecdb1d58e2bc7f7b3a6d1b3c2c169ae70 (diff) |
more avatar fixes
git-svn-id: http://svn.miranda-ng.org/main/trunk@498 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Twitter/utility.cpp')
-rw-r--r-- | protocols/Twitter/utility.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
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);
}
|