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

MediaLibrary: Fix invalid assumption about removable being removable

(cherry picked from commit f6c53934)
Signed-off-by: 's avatarHugo Beauzée-Luyssen <hugo@beauzee.fr>
parent fb30260e
...@@ -1641,8 +1641,14 @@ bool MediaLibrary::DeviceListerCb::onDeviceMounted( const std::string& uuid, ...@@ -1641,8 +1641,14 @@ bool MediaLibrary::DeviceListerCb::onDeviceMounted( const std::string& uuid,
{ {
try try
{ {
deviceFs = fsFactory->createDevice( uuid );
if ( deviceFs == nullptr )
{
assert( !"The device must be available after a refresh" );
return false;
}
if ( Device::create( m_ml, uuid, fsFactory->scheme(), if ( Device::create( m_ml, uuid, fsFactory->scheme(),
true ) == nullptr ) deviceFs->isRemovable() ) == nullptr )
return false; return false;
} }
// And be conservative and assume another thread might have // And be conservative and assume another thread might have
......
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