mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-03 14:45:12 -04:00
Fixed problem with utf characters in the %APPDATA% path on Windows.
Added function for opening files on Windows and Linux - RsDirUtil::rs_fopen. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4124 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
bc78397a64
commit
bc113326e4
17 changed files with 109 additions and 119 deletions
|
@ -718,7 +718,7 @@ bool CacheStrapper::CacheExist(CacheData& data){
|
|||
|
||||
std::string filename = data.path + "/" + data.name;
|
||||
FILE* file = NULL;
|
||||
file = fopen(filename.c_str(), "r");
|
||||
file = RsDirUtil::rs_fopen(filename.c_str(), "r");
|
||||
|
||||
if(file == NULL)
|
||||
return false;
|
||||
|
|
|
@ -978,7 +978,7 @@ int FileIndex::saveIndex(const std::string& filename, std::string &fileHash, uin
|
|||
|
||||
/* finally, save to file */
|
||||
|
||||
FILE *file = fopen(filenametmp.c_str(), "wb");
|
||||
FILE *file = RsDirUtil::rs_fopen(filenametmp.c_str(), "wb");
|
||||
if (file == NULL)
|
||||
{
|
||||
std::cerr << "FileIndex::saveIndex error opening file for writting: " << filename << ". Giving up." << std::endl;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue