mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -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
@ -41,7 +41,8 @@ bool FolderIterator::readdir() {
|
||||
}
|
||||
return FindNextFileW(handle, &fileInfo) != 0;
|
||||
#else
|
||||
return readdir(handle) == 0;
|
||||
ent = ::readdir(handle);
|
||||
return ent != 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -56,7 +57,9 @@ bool FolderIterator::d_name(std::string& dest)
|
||||
return false;
|
||||
}
|
||||
#else
|
||||
dest = handle->d_name;
|
||||
if(ent == 0)
|
||||
return false;
|
||||
dest = ent->d_name;
|
||||
#endif
|
||||
|
||||
return true;
|
||||
@ -72,7 +75,7 @@ bool FolderIterator::closedir()
|
||||
#ifdef WINDOWS_SYS
|
||||
return FindClose(handle) != 0;
|
||||
#else
|
||||
return closedir(handle) == 0;
|
||||
return ::closedir(handle) == 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -42,6 +42,7 @@ private:
|
||||
_WIN32_FIND_DATAW fileInfo;
|
||||
#else
|
||||
DIR* handle;
|
||||
struct dirent* ent;
|
||||
#endif
|
||||
|
||||
};
|
||||
|
@ -1,6 +1,9 @@
|
||||
#include "util/rswin.h"
|
||||
|
||||
|
||||
#ifdef WINDOWS_SYS
|
||||
|
||||
|
||||
namespace librs { namespace util {
|
||||
|
||||
|
||||
@ -47,3 +50,6 @@ bool ConvertUtf16ToUtf8(const std::wstring& source, std::string& dest) {
|
||||
|
||||
|
||||
} } // librs::util
|
||||
|
||||
|
||||
#endif // WINDOWS_SYS
|
||||
|
Loading…
Reference in New Issue
Block a user