mirror of
https://bitbucket.org/smil3y/kde-workspace.git
synced 2025-02-23 18:32:50 +00:00
soliduiserver: store the filesystem match string outside the loop
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
4f1ae2af3f
commit
9e4c84f8e6
1 changed files with 2 additions and 1 deletions
|
@ -120,9 +120,10 @@ KAuth::ActionReply SolidUiServerHelper::mount(const QVariantMap ¶meters)
|
|||
const QByteArray fstypebytes = fstype.toLocal8Bit();
|
||||
QFile filesystemsfile(QString::fromLatin1("/proc/filesystems"));
|
||||
if (filesystemsfile.open(QFile::ReadOnly)) {
|
||||
const QByteArray filesystemmatch = QByteArray(" ") + fstypebytes;
|
||||
while (!filesystemsfile.atEnd()) {
|
||||
const QByteArray filesystemsline = filesystemsfile.readLine().trimmed();
|
||||
if (filesystemsline.endsWith(QByteArray(" ") + fstypebytes)) {
|
||||
if (filesystemsline.endsWith(filesystemmatch)) {
|
||||
isknownfs = true;
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue