mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-02 14:16:16 -04:00
Fixed utf8 issues when the partial or the download dir is set to a utf8 dir.
Use the native dialog for selecting the shared folder. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4083 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
b245ad7cf7
commit
127eac1118
5 changed files with 92 additions and 39 deletions
|
@ -251,7 +251,13 @@ int ftFileCreator::locked_initializeFileAttrs()
|
|||
* attempt to open file
|
||||
*/
|
||||
|
||||
#ifdef WINDOWS_SYS
|
||||
std::wstring wfile_name;
|
||||
librs::util::ConvertUtf8ToUtf16(file_name, wfile_name);
|
||||
fd = _wfopen(wfile_name.c_str(), L"r+b");
|
||||
#else
|
||||
fd = fopen64(file_name.c_str(), "r+b");
|
||||
#endif
|
||||
|
||||
if (!fd)
|
||||
{
|
||||
|
@ -262,7 +268,11 @@ int ftFileCreator::locked_initializeFileAttrs()
|
|||
std::cerr << std::endl;
|
||||
|
||||
/* try opening for write */
|
||||
#ifdef WINDOWS_SYS
|
||||
fd = _wfopen(wfile_name.c_str(), L"w+b");
|
||||
#else
|
||||
fd = fopen64(file_name.c_str(), "w+b");
|
||||
#endif
|
||||
if (!fd)
|
||||
{
|
||||
std::cerr << "ftFileCreator::initializeFileAttrs()";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue