Fix an oopsie

This commit is contained in:
Jérôme Leclercq 2018-04-10 16:22:18 +02:00
parent 938aa79ffc
commit dae2b6f5a6
1 changed files with 15 additions and 18 deletions

View File

@ -32,8 +32,6 @@ namespace Nz
}
UInt64 DirectoryImpl::GetResultSize() const
{
if (S_ISREG(m_result->d_type))
{
String path = m_parent->GetPath();
std::size_t pathSize = path.GetSize();
@ -52,13 +50,12 @@ namespace Nz
return results.st_size;
}
else
return 0;
}
bool DirectoryImpl::IsResultDirectory() const
{
return S_ISDIR(m_result->d_type);
//TODO: Fix d_type handling (field can be missing or be a symbolic link, both cases which must be handled by calling stat)
return m_result->d_type == DT_DIR;
}
bool DirectoryImpl::NextResult()