summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
authorDavid Faure <faure@kde.org>2011-12-19 20:44:45 +0100
committerQt by Nokia <qt-info@nokia.com>2011-12-19 20:48:16 +0100
commit8707c09fcddb3d335ba79394f266a88129ba5ba2 (patch)
treedc98ae91da9ba970c222f4bc12da78a9ae526f95 /src/corelib
parent0443a51228e87499470536d570284a4bbab85d0f (diff)
Fix QDir::removeRecursively so it doesn't follow symlinks to directories.
Critical bug... Good thing I had backups of my $HOME. Change-Id: I43b3a80786c946b0aec797036c1164d436d521f8 Reviewed-by: Robin Burchell <robin+qt@viroteck.net> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/io/qdir.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/io/qdir.cpp b/src/corelib/io/qdir.cpp
index 44992fcd14..04e61e5b26 100644
--- a/src/corelib/io/qdir.cpp
+++ b/src/corelib/io/qdir.cpp
@@ -1502,7 +1502,7 @@ bool QDir::removeRecursively()
di.next();
const QFileInfo& fi = di.fileInfo();
bool ok;
- if (fi.isDir())
+ if (fi.isDir() && !fi.isSymLink())
ok = QDir(di.filePath()).removeRecursively(); // recursive
else
ok = QFile::remove(di.filePath());