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/FacebookRM/communication.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/FacebookRM/communication.cpp')
-rw-r--r-- | protocols/FacebookRM/communication.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/protocols/FacebookRM/communication.cpp b/protocols/FacebookRM/communication.cpp index 4afb031cac..90296b18e0 100644 --- a/protocols/FacebookRM/communication.cpp +++ b/protocols/FacebookRM/communication.cpp @@ -1240,7 +1240,7 @@ bool facebook_client::set_status(const std::string &status_text) //////////////////////////////////////////////////////////////////////////////
-bool facebook_client::save_url(const std::string &url,const std::string &filename, HANDLE &nlc)
+bool facebook_client::save_url(const std::string &url,const std::tstring &filename, HANDLE &nlc)
{
NETLIBHTTPREQUEST req = {sizeof(req)};
NETLIBHTTPREQUEST *resp;
@@ -1258,12 +1258,12 @@ bool facebook_client::save_url(const std::string &url,const std::string &filenam parent->Log( "@@@@@ Saving avatar URL %s to path %s", url.c_str(), filename.c_str() );
// 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);
|