File 0001-Rename-variables-into-more-appropriate-fstabPath-and.patch of Package kpmcore
From d92ebc0b760939cf0f1644af99c42907fe68eb9d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andrius=20=C5=A0tikonas?= <andrius@stikonas.eu>
Date: Sun, 20 Feb 2022 20:47:43 +0000
Subject: [PATCH] Rename variables into more appropriate fstabPath and
fstabFile.
---
src/util/externalcommandhelper.cpp | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/util/externalcommandhelper.cpp b/src/util/externalcommandhelper.cpp
index 9cf8e32..6da2a21 100644
--- a/src/util/externalcommandhelper.cpp
+++ b/src/util/externalcommandhelper.cpp
@@ -134,17 +134,17 @@ bool ExternalCommandHelper::WriteFstab(const QByteArray& fileContents)
if (!isCallerAuthorized()) {
return false;
}
- QString filePath = QStringLiteral("/etc/fstab");
- QFile device(filePath);
+ QString fstabPath = QStringLiteral("/etc/fstab");
+ QFile fstabFile(fstabPath);
auto flags = QIODevice::WriteOnly | QIODevice::Unbuffered;
- if (!device.open(flags)) {
- qCritical() << xi18n("Could not open file <filename>%1</filename> for writing.", filePath);
+ if (!fstabFile.open(flags)) {
+ qCritical() << xi18n("Could not open file <filename>%1</filename> for writing.", fstabPath);
return false;
}
- if (device.write(fileContents) != fileContents.size()) {
- qCritical() << xi18n("Could not write to file <filename>%1</filename>.", filePath);
+ if (fstabFile.write(fileContents) != fileContents.size()) {
+ qCritical() << xi18n("Could not write to file <filename>%1</filename>.", fstabPath);
return false;
}
--
2.35.1