mirror of
https://bitbucket.org/smil3y/kde-workspace.git
synced 2025-02-23 18:32:50 +00:00
kdesudo: use the static QFile::exists() method instead of constructing QFile object and changing its filename
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
dcc3b987b4
commit
3bc3e31176
1 changed files with 1 additions and 4 deletions
|
@ -177,10 +177,7 @@ KdeSudo::KdeSudo(const QString &icon, const QString &appname) :
|
|||
|
||||
// non root users need to be able to read the xauth file.
|
||||
// the xauth file is deleted when kdesudo exits. security?
|
||||
QFile tf;
|
||||
tf.setFileName(m_tmpName);
|
||||
|
||||
if (!runas.isEmpty() && runas != "root" && tf.exists()) {
|
||||
if (!runas.isEmpty() && runas != "root" && QFile::exists(m_tmpName)) {
|
||||
chmod(QFile::encodeName(m_tmpName), 0644);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue