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

FsDiscoverer: Handle unmounted devices

parent 1338ecf6
......@@ -135,7 +135,7 @@ bool FsDiscoverer::checkSubfolders( fs::IDirectory* folder, Folder* parentFolder
auto folderInDb = *it;
auto deviceFs = subFolder->device();
// If the device supposed to contain this folder is not present anymore, flag it as removed
if ( deviceFs == nullptr )
if ( deviceFs == nullptr || deviceFs->isPresent() == false )
{
auto device = Device::fetch( m_dbConn, folderInDb->deviceId() );
if ( device == nullptr )
......
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