mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-08-01 18:56:23 -04:00
This is a patch for the previous patch *facepalms*
I got confused somehow between the different versions of my modifications and Linux/Windows, anyway it should work now. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2925 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
b30056e17f
commit
913789b972
3 changed files with 13 additions and 3 deletions
|
@ -41,7 +41,8 @@ bool FolderIterator::readdir() {
|
||||||
}
|
}
|
||||||
return FindNextFileW(handle, &fileInfo) != 0;
|
return FindNextFileW(handle, &fileInfo) != 0;
|
||||||
#else
|
#else
|
||||||
return readdir(handle) == 0;
|
ent = ::readdir(handle);
|
||||||
|
return ent != 0;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -56,7 +57,9 @@ bool FolderIterator::d_name(std::string& dest)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
dest = handle->d_name;
|
if(ent == 0)
|
||||||
|
return false;
|
||||||
|
dest = ent->d_name;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -72,7 +75,7 @@ bool FolderIterator::closedir()
|
||||||
#ifdef WINDOWS_SYS
|
#ifdef WINDOWS_SYS
|
||||||
return FindClose(handle) != 0;
|
return FindClose(handle) != 0;
|
||||||
#else
|
#else
|
||||||
return closedir(handle) == 0;
|
return ::closedir(handle) == 0;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -42,6 +42,7 @@ private:
|
||||||
_WIN32_FIND_DATAW fileInfo;
|
_WIN32_FIND_DATAW fileInfo;
|
||||||
#else
|
#else
|
||||||
DIR* handle;
|
DIR* handle;
|
||||||
|
struct dirent* ent;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
#include "util/rswin.h"
|
#include "util/rswin.h"
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef WINDOWS_SYS
|
||||||
|
|
||||||
|
|
||||||
namespace librs { namespace util {
|
namespace librs { namespace util {
|
||||||
|
|
||||||
|
|
||||||
|
@ -47,3 +50,6 @@ bool ConvertUtf16ToUtf8(const std::wstring& source, std::string& dest) {
|
||||||
|
|
||||||
|
|
||||||
} } // librs::util
|
} } // librs::util
|
||||||
|
|
||||||
|
|
||||||
|
#endif // WINDOWS_SYS
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue