Fix an oopsie
This commit is contained in:
parent
938aa79ffc
commit
dae2b6f5a6
|
|
@ -32,8 +32,6 @@ namespace Nz
|
||||||
}
|
}
|
||||||
|
|
||||||
UInt64 DirectoryImpl::GetResultSize() const
|
UInt64 DirectoryImpl::GetResultSize() const
|
||||||
{
|
|
||||||
if (S_ISREG(m_result->d_type))
|
|
||||||
{
|
{
|
||||||
String path = m_parent->GetPath();
|
String path = m_parent->GetPath();
|
||||||
std::size_t pathSize = path.GetSize();
|
std::size_t pathSize = path.GetSize();
|
||||||
|
|
@ -52,13 +50,12 @@ namespace Nz
|
||||||
|
|
||||||
return results.st_size;
|
return results.st_size;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool DirectoryImpl::IsResultDirectory() const
|
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()
|
bool DirectoryImpl::NextResult()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue