diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/io/qdir.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/corelib/io/qdir.cpp b/src/corelib/io/qdir.cpp index 3a04920..eb02e6c 100644 --- a/src/corelib/io/qdir.cpp +++ b/src/corelib/io/qdir.cpp @@ -929,14 +929,13 @@ bool QDir::cd(const QString &dirName) } } } - { - QFileInfo fi(newPath); - if (!(fi.exists() && fi.isDir())) - return false; - } - d->setPath(newPath); - refresh(); + QDir dir(*this); + dir.setPath(newPath); + if (!dir.exists()) + return false; + + *this = dir; return true; } |