Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
System
KPMCore
Commits
858f8d9b
Commit
858f8d9b
authored
Feb 20, 2022
by
Andrius Štikonas
Browse files
Add a comment about WriteOnly.
parent
d92ebc0b
Pipeline
#140265
passed with stage
in 2 minutes and 42 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/util/externalcommandhelper.cpp
View file @
858f8d9b
...
...
@@ -137,6 +137,7 @@ bool ExternalCommandHelper::WriteFstab(const QByteArray& fileContents)
QString
fstabPath
=
QStringLiteral
(
"/etc/fstab"
);
QFile
fstabFile
(
fstabPath
);
// WriteOnly implies O_TRUNC
auto
flags
=
QIODevice
::
WriteOnly
|
QIODevice
::
Unbuffered
;
if
(
!
fstabFile
.
open
(
flags
))
{
qCritical
()
<<
xi18n
(
"Could not open file <filename>%1</filename> for writing."
,
fstabPath
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment