Rename variables into more appropriate fstabPath and fstabFile.
This commit is contained in:
parent
e483bab0d5
commit
d92ebc0b76
|
@ -134,17 +134,17 @@ bool ExternalCommandHelper::WriteFstab(const QByteArray& fileContents)
|
||||||
if (!isCallerAuthorized()) {
|
if (!isCallerAuthorized()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
QString filePath = QStringLiteral("/etc/fstab");
|
QString fstabPath = QStringLiteral("/etc/fstab");
|
||||||
QFile device(filePath);
|
QFile fstabFile(fstabPath);
|
||||||
|
|
||||||
auto flags = QIODevice::WriteOnly | QIODevice::Unbuffered;
|
auto flags = QIODevice::WriteOnly | QIODevice::Unbuffered;
|
||||||
if (!device.open(flags)) {
|
if (!fstabFile.open(flags)) {
|
||||||
qCritical() << xi18n("Could not open file <filename>%1</filename> for writing.", filePath);
|
qCritical() << xi18n("Could not open file <filename>%1</filename> for writing.", fstabPath);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (device.write(fileContents) != fileContents.size()) {
|
if (fstabFile.write(fileContents) != fileContents.size()) {
|
||||||
qCritical() << xi18n("Could not write to file <filename>%1</filename>.", filePath);
|
qCritical() << xi18n("Could not write to file <filename>%1</filename>.", fstabPath);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue