diff options
-rw-r--r-- | src/corelib/io/qdir.cpp | 4 | ||||
-rw-r--r-- | src/corelib/io/qfileinfo.cpp | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/corelib/io/qdir.cpp b/src/corelib/io/qdir.cpp index 22a3baa..e1fed0d 100644 --- a/src/corelib/io/qdir.cpp +++ b/src/corelib/io/qdir.cpp @@ -1544,7 +1544,9 @@ bool QDir::isRoot() const */ bool QDir::isRelative() const { - return d_ptr->dirEntry.isRelative(); + if (d_ptr->fileEngine.isNull()) + return d_ptr->dirEntry.isRelative(); + return d_ptr->fileEngine->isRelativePath(); } diff --git a/src/corelib/io/qfileinfo.cpp b/src/corelib/io/qfileinfo.cpp index 471da2e..9041c94 100644 --- a/src/corelib/io/qfileinfo.cpp +++ b/src/corelib/io/qfileinfo.cpp @@ -623,7 +623,9 @@ bool QFileInfo::isRelative() const Q_D(const QFileInfo); if (d->isDefaultConstructed) return true; - return d->fileEntry.isRelative(); + if (d->fileEngine == 0) + return d->fileEntry.isRelative(); + return d->fileEngine->isRelativePath(); } /*! |