Split fstab lines with both spaces and tabs.

This commit is contained in:
Andrius Štikonas 2017-09-13 23:05:32 +01:00
parent 8f7e0beb0f
commit 268a68a318
1 changed files with 2 additions and 1 deletions

View File

@ -24,6 +24,7 @@
#include <QChar>
#include <QFile>
#include <QFileInfo>
#include <QRegularExpression>
static QString findBlkIdDevice(const QString& token, const QString& value)
{
@ -86,7 +87,7 @@ FstabEntryList readFstabEntries( const QString& fstabPath )
}
QString comment = line.section( QLatin1Char('#'), 1 );
QStringList splitLine = line.section( QLatin1Char('#'), 0, 0 ).split( QLatin1Char(' ') );
QStringList splitLine = line.section( QLatin1Char('#'), 0, 0 ).split( QRegularExpression(QStringLiteral("\\s")) );
// We now split the standard components of /etc/fstab entry:
// (0) path, or UUID, or LABEL, etc,