diff --git a/src/network/socket/qlocalserver_unix.cpp b/src/network/socket/qlocalserver_unix.cpp index a5ae363540..1e5a4e98ee 100644 --- a/src/network/socket/qlocalserver_unix.cpp +++ b/src/network/socket/qlocalserver_unix.cpp @@ -171,12 +171,10 @@ bool QLocalServerPrivate::listen(const QString &requestedServerName) if (socketOptions & QLocalServer::OtherAccessOption) mode |= S_IRWXO; - if (mode) { - if (::chmod(tempPath.toLatin1(), mode) == -1) { - setError(QLatin1String("QLocalServer::listen")); - closeServer(); - return false; - } + if (::chmod(tempPath.toLatin1(), mode) == -1) { + setError(QLatin1String("QLocalServer::listen")); + closeServer(); + return false; } if (::rename(tempPath.toLatin1(), fullServerName.toLatin1()) == -1) {