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 %1 for writing.", filePath);
+ if (!fstabFile.open(flags)) {
+ qCritical() << xi18n("Could not open file %1 for writing.", fstabPath);
return false;
}
- if (device.write(fileContents) != fileContents.size()) {
- qCritical() << xi18n("Could not write to file %1.", filePath);
+ if (fstabFile.write(fileContents) != fileContents.size()) {
+ qCritical() << xi18n("Could not write to file %1.", fstabPath);
return false;
}