diff options
author | Ritt Konstantin <ritt.ks@gmail.com> | 2009-08-21 12:52:02 (GMT) |
---|---|---|
committer | Joerg Bornemann <joerg.bornemann@trolltech.com> | 2009-08-21 13:10:30 (GMT) |
commit | bc58c9d33c3e333dd51f2aa60fd4bdcb296b2649 (patch) | |
tree | d42e3b32b81270c64c3b828073dd60ff94f6c746 | |
parent | 7ce08a2058daadf27dcd145bd7ce61b5fd73eee6 (diff) | |
download | Qt-bc58c9d33c3e333dd51f2aa60fd4bdcb296b2649.zip Qt-bc58c9d33c3e333dd51f2aa60fd4bdcb296b2649.tar.gz Qt-bc58c9d33c3e333dd51f2aa60fd4bdcb296b2649.tar.bz2 |
QFSFileEngine: fix inverted logic for return values
Merge-request: 833
Reviewed-by: Joerg Bornemann <joerg.bornemann@trolltech.com>
-rw-r--r-- | src/corelib/io/qfsfileengine_unix.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/corelib/io/qfsfileengine_unix.cpp b/src/corelib/io/qfsfileengine_unix.cpp index dc7fafd..9cd187d 100644 --- a/src/corelib/io/qfsfileengine_unix.cpp +++ b/src/corelib/io/qfsfileengine_unix.cpp @@ -913,18 +913,18 @@ bool QFSFileEngine::setPermissions(uint perms) if (perms & ExeOtherPerm) mode |= S_IXOTH; if (d->fd != -1) - return !fchmod(d->fd, mode); - return !::chmod(d->nativeFilePath.constData(), mode); + return fchmod(d->fd, mode) == 0; + return ::chmod(d->nativeFilePath.constData(), mode) == 0; } bool QFSFileEngine::setSize(qint64 size) { Q_D(QFSFileEngine); if (d->fd != -1) - return !QT_FTRUNCATE(d->fd, size); + return QT_FTRUNCATE(d->fd, size) == 0; if (d->fh) - return !QT_FTRUNCATE(QT_FILENO(d->fh), size); - return !QT_TRUNCATE(d->nativeFilePath.constData(), size); + return QT_FTRUNCATE(QT_FILENO(d->fh), size) == 0; + return QT_TRUNCATE(d->nativeFilePath.constData(), size) == 0; } QDateTime QFSFileEngine::fileTime(FileTime time) const |