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

Folder: Use the FS removable state instead of the DB one

parent 15c53f0b
......@@ -186,11 +186,11 @@ std::shared_ptr<Folder> Folder::create( MediaLibraryPtr ml, const std::string& m
else
path = mrl;
auto self = std::make_shared<Folder>( ml, path, parentId, device.id(),
device.isRemovable() );
deviceFs.isRemovable() );
static const std::string req = "INSERT INTO " + Folder::Table::Name +
"(path, name, parent_id, device_id, is_removable) VALUES(?, ?, ?, ?, ?)";
if ( insert( ml, self, req, path, self->m_name, sqlite::ForeignKey( parentId ),
device.id(), device.isRemovable() ) == false )
device.id(), deviceFs.isRemovable() ) == false )
return nullptr;
if ( device.isRemovable() == true )
self->m_fullPath = deviceFs.absoluteMrl( 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