summaryrefslogtreecommitdiffstats
path: root/src/widgets/dialogs/qfilesystemmodel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets/dialogs/qfilesystemmodel.cpp')
-rw-r--r--src/widgets/dialogs/qfilesystemmodel.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/widgets/dialogs/qfilesystemmodel.cpp b/src/widgets/dialogs/qfilesystemmodel.cpp
index 6dcc354f94..bda448bde3 100644
--- a/src/widgets/dialogs/qfilesystemmodel.cpp
+++ b/src/widgets/dialogs/qfilesystemmodel.cpp
@@ -204,6 +204,8 @@ bool QFileSystemModel::remove(const QModelIndex &aindex)
#ifndef QT_NO_FILESYSTEMWATCHER
d->fileInfoGatherer.removePath(path);
#endif
+ if (QFileInfo(path).isFile())
+ return QFile::remove(path);
return QDir(path).removeRecursively();
}