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

MediaLibrary: Remove duplicated code

parent cb760e95
......@@ -106,10 +106,7 @@ FilePtr MediaLibrary::file( const std::string& path )
FilePtr MediaLibrary::addFile( const std::string& path )
{
auto fsFile = m_fsFactory->createFile( path );
auto file = File::create( m_dbConnection, fsFile.get(), 0 );
if ( file == nullptr )
return nullptr;
return file;
return addFile( fsFile.get(), 0 );
}
FolderPtr MediaLibrary::folder( const std::string& 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