mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-02 22:25:04 -04:00
Fixed umlauts (utf8) in Windows. Changed some parameters to reference pointer. Added virtual folders to the lib.
Recompile needed. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3509 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
dccfbf20b0
commit
ed737e2c9f
21 changed files with 892 additions and 914 deletions
|
@ -363,8 +363,19 @@ int RsDirUtil::breakupDirList(std::string path,
|
|||
|
||||
bool RsDirUtil::checkDirectory(std::string dir)
|
||||
{
|
||||
int val;
|
||||
mode_t st_mode;
|
||||
#ifdef WINDOWS_SYS
|
||||
std::wstring wdir;
|
||||
librs::util::ConvertUtf8ToUtf16(dir, wdir);
|
||||
struct _stat buf;
|
||||
val = _wstat(wdir.c_str(), &buf);
|
||||
st_mode = buf.st_mode;
|
||||
#else
|
||||
struct stat buf;
|
||||
int val = stat(dir.c_str(), &buf);
|
||||
val = stat(dir.c_str(), &buf);
|
||||
st_mode = buf.st_mode;
|
||||
#endif
|
||||
if (val == -1)
|
||||
{
|
||||
#ifdef RSDIR_DEBUG
|
||||
|
@ -373,7 +384,7 @@ bool RsDirUtil::checkDirectory(std::string dir)
|
|||
#endif
|
||||
return false;
|
||||
}
|
||||
else if (!S_ISDIR(buf.st_mode))
|
||||
else if (!S_ISDIR(st_mode))
|
||||
{
|
||||
// Some other type - error.
|
||||
#ifdef RSDIR_DEBUG
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue