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

MetadataParser: Don't relocate an already owned thumbnail

When sharing thumbnails, this might end up copying a thumbnail over
itself, which would first remove the existing destination, but since
source and destination are the same file, this would end up just
removing the source and not copying anything
parent 554249d3
Pipeline #12534 passed with stage
in 51 minutes and 45 seconds
......@@ -980,7 +980,7 @@ Status MetadataAnalyzer::parseAudioFile( IItem& item )
if ( res != Status::Success )
return res;
if ( thumbnail != nullptr )
if ( thumbnail != nullptr && thumbnail->isOwned() == false )
{
assert( thumbnail->status() == ThumbnailStatus::Available );
thumbnail->relocate();
......
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