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

mocks: FS: Don't return content for a removed device

parent cefbf4f2
......@@ -333,14 +333,14 @@ public:
std::shared_ptr<File> file( const std::string& filePath )
{
if ( m_root == nullptr )
if ( m_root == nullptr || m_present == false )
return nullptr;
return m_root->file( relativePath( filePath ) );
}
std::shared_ptr<Directory> directory( const std::string& path )
{
if ( m_root == nullptr )
if ( m_root == nullptr || m_present == false )
return nullptr;
const auto relPath = relativePath( path );
if ( relPath.empty() == true )
......
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