Skip to content
Snippets Groups Projects
Commit 7d5795a6 authored by Teo Mrnjavac's avatar Teo Mrnjavac
Browse files

Empty path should yield nullptr Partition.

parent 24c1bf42
No related branches found
No related tags found
No related merge requests found
......@@ -83,6 +83,9 @@ findPartitionByMountPoint( const QList< Device* >& devices, const QString& mount
Partition*
findPartitionByPath( const QList< Device* >& devices, const QString& path )
{
if ( path.simplified().isEmpty() )
return nullptr;
for ( auto device : devices )
for ( auto it = PartitionIterator::begin( device ); it != PartitionIterator::end( device ); ++it )
if ( ( *it )->partitionPath() == path.simplified() )
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment