Commit f7668516 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen
Browse files

fs: unix: Dir: Remove duplicated check.

opendir will fail soon enough if we're trying to open something which
isn't a directory
parent 8d222da3
......@@ -38,14 +38,6 @@ namespace fs
Directory::Directory( const std::string& path )
: m_path( toAbsolute( path ) )
{
#ifndef NDEBUG
struct stat s;
if ( lstat( m_path.c_str(), &s ) != 0 )
throw std::runtime_error( "Failed to stat directory " + path + "(" +
strerror( errno ) + ")" );
if ( S_ISDIR( s.st_mode ) == false )
throw std::runtime_error( "The provided path isn't a directory" );
#endif
if ( *m_path.crbegin() != '/' )
m_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