Commit cd1d1571 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

directory: Use the full path before converting to absolute path

parent e5c0f883
......@@ -80,6 +80,8 @@ void Directory::read()
{
continue;
}
std::string path = m_path + "/" + result->d_name;
#if defined(_DIRENT_HAVE_D_TYPE) && defined(_BSD_SOURCE)
if ( result->d_type == DT_DIR )
{
......@@ -95,11 +97,11 @@ void Directory::read()
if ( S_ISDIR( s.st_mode ) )
{
#endif
m_dirs.emplace_back( toAbsolute( result->d_name ) );
m_dirs.emplace_back( toAbsolute( path ) );
}
else
{
m_files.emplace_back( toAbsolute( result->d_name ) );
m_files.emplace_back( toAbsolute( path ) );
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment