Maemo: Fix recursive directory removal.

It's not an error if the directory does not exist.
This commit is contained in:
Christian Kandeler
2010-11-26 14:41:04 +01:00
parent 3488b0446c
commit 9385fc12a7

View File

@@ -78,6 +78,8 @@ QString MaemoGlobal::remoteEnvironment(const QList<Utils::EnvironmentItem> &list
bool MaemoGlobal::removeRecursively(const QString &filePath, QString &error) bool MaemoGlobal::removeRecursively(const QString &filePath, QString &error)
{ {
QFileInfo fileInfo(filePath); QFileInfo fileInfo(filePath);
if (!fileInfo.exists())
return true;
if (fileInfo.isDir()) { if (fileInfo.isDir()) {
QDir dir(filePath); QDir dir(filePath);
QStringList fileNames = dir.entryList(QDir::Files | QDir::Hidden QStringList fileNames = dir.entryList(QDir::Files | QDir::Hidden