fix Win64 bug in FileInfo

This commit is contained in:
jriegel 2014-08-27 22:22:29 +02:00
parent 5bdfe81488
commit f260a0f219

View File

@ -522,15 +522,16 @@ std::vector<Base::FileInfo> FileInfo::getDirectoryContent(void) const
{ {
std::vector<Base::FileInfo> List; std::vector<Base::FileInfo> List;
#if defined (FC_OS_WIN32) #if defined (FC_OS_WIN32)
struct _wfinddata_t dentry; struct _wfinddata_t dentry;
long hFile;
intptr_t hFile;
// Find first directory entry // Find first directory entry
std::wstring wstr = toStdWString(); std::wstring wstr = toStdWString();
wstr += L"/*"; wstr += L"/*";
if ((hFile = _wfindfirst( wstr.c_str(), &dentry)) == -1L) if ((hFile = _wfindfirst( wstr.c_str(), &dentry)) == -1L)
return List; return List;
while (_wfindnext(hFile, &dentry) == 0) while (_wfindnext(hFile, &dentry) == 0)
if (wcscmp(dentry.name,L"..") != 0) if (wcscmp(dentry.name,L"..") != 0)