[libcalamares] Fix entry-format, it was totally bogus

This commit is contained in:
Adriaan de Groot 2022-03-01 16:14:45 +01:00
parent 2f782f18c4
commit 7aafeec2cb

View File

@ -144,9 +144,9 @@ MtabInfo::fromMtabFilteredByPrefix( const QString& mountPrefix, const QString& m
}
QStringList parts = line.split( ' ', SplitSkipEmptyParts );
if ( parts.length() == 3 && !parts[ 0 ].startsWith( '#' ) )
if ( parts.length() >= 3 && !parts[ 0 ].startsWith( '#' ) )
{
// Lines have format: <device> <mountpoint> <options>, so check
// Lines have format: <device> <mountpoint> <fstype> <options>..., so check
// the mountpoint field. Everything starts with an empty string.
if ( parts[ 1 ].startsWith( mountPrefix ) )
{